summarylogtreecommitdiffstats
path: root/0008-Fix-linking-against-shared-static-libpng.patch
blob: 69f37f17aeabcad6cc54a0303a2c2f86541716e8 (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 a21de39b50f538d9dce89bab8fc12cfb631d3f6b 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 6fdcd562a7..7733db0206 100644
--- a/src/gui/configure.json
+++ b/src/gui/configure.json
@@ -387,8 +387,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.21.0