summarylogtreecommitdiffstats
path: root/0008-Fix-linking-against-shared-static-libpng.patch
blob: c6d0a2cbfb694cdd258a90e676de4279c8928532 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
From 95710d93c0d010afaa8ac7433b99827346bc011b Mon Sep 17 00:00:00 2001
From: Martchus <martchus@gmx.net>
Date: Thu, 26 Jan 2017 17:51:31 +0100
Subject: [PATCH 08/34] Fix linking against shared/static libpng

Change-Id: Ic7a0ec9544059b8e647a5d0186f1b88c00911dcf
---
 src/gui/configure.json | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/src/gui/configure.json b/src/gui/configure.json
index 89934c8f1d..9124e3e77e 100644
--- a/src/gui/configure.json
+++ b/src/gui/configure.json
@@ -385,8 +385,10 @@
                 { "type": "pkgConfig", "args": "libpng" },
                 { "libs": "-llibpng16", "condition": "config.msvc" },
                 { "libs": "-llibpng", "condition": "config.msvc" },
-                { "libs": "-lpng16", "condition": "!config.msvc" },
-                { "libs": "-lpng", "condition": "!config.msvc" },
+                { "libs": "-lpng16 -lz", "condition": "!config.msvc && !features.shared" },
+                { "libs": "-lpng -lz", "condition": "!config.msvc && !features.shared" },
+                { "libs": "-lpng16", "condition": "!config.msvc && features.shared" },
+                { "libs": "-lpng", "condition": "!config.msvc && features.shared" },
                 { "libs": "-s USE_LIBPNG=1", "condition": "config.wasm" }
             ],
             "use": [
-- 
2.20.1