summaryrefslogtreecommitdiffstats
path: root/src/qtimageformats-1-cherrypicks.patch
blob: 5aab2253fe16c16bcc698bf9516c8ae7d5089e14 (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
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
This file is part of MXE.
See index.html for further information.

From 7454a10238d663e048aec1e1a1871a76da646345 Mon Sep 17 00:00:00 2001
From: Mark Brand <mabrand@mabrand.nl>
Date: Thu, 3 Nov 2011 14:11:02 +0100
Subject: [PATCH 1/2] add pkg-config support for libtiff-4

Change-Id: I387517e04fed7729e5acf28bacdfc289fb2d17bd

diff --git a/config.tests/libtiff/libtiff.pro b/config.tests/libtiff/libtiff.pro
index 60ba7d1..0544f55 100644
--- a/config.tests/libtiff/libtiff.pro
+++ b/config.tests/libtiff/libtiff.pro
@@ -1,4 +1,7 @@
 SOURCES = libtiff.cpp
 CONFIG -= qt dylib
 mac:CONFIG -= app_bundle
-LIBS += -ltiff
+CONFIG += link_pkgconfig
+packagesExist(libtiff-4):PKGCONFIG += libtiff-4
+else:if(unix|win32-g++*): LIBS += -ltiff
+else:win32: LIBS += libtiff.lib
diff --git a/src/plugins/imageformats/tiff/tiff.pro b/src/plugins/imageformats/tiff/tiff.pro
index 66eea8c..8582740 100644
--- a/src/plugins/imageformats/tiff/tiff.pro
+++ b/src/plugins/imageformats/tiff/tiff.pro
@@ -9,7 +9,9 @@ SOURCES += main.cpp qtiffhandler.cpp
 OTHER_FILES += tiff.json
 
 config_libtiff {
-    unix|win32-g++*: LIBS += -ltiff
+    CONFIG += link_pkgconfig
+    packagesExist(libtiff-4):PKGCONFIG += libtiff-4
+    else:if(unix|win32-g++*): LIBS += -ltiff
     else:win32: LIBS += libtiff.lib
 } else {
     include($$PWD/../../../3rdparty/libtiff.pri)
-- 
1.7.10.4


From 4356a1b1d7dfd3391688ab08ba667465121e34b3 Mon Sep 17 00:00:00 2001
From: Mark Brand <mabrand@mabrand.nl>
Date: Wed, 19 Dec 2012 23:29:52 +0100
Subject: [PATCH 2/2] add pkg-config support for libmng (mxe-specific)

Change-Id: I1216f35a01a974321efa2463b687c121baa22667

diff --git a/config.tests/libmng/libmng.pro b/config.tests/libmng/libmng.pro
index ee57ecd..4c2d305 100644
--- a/config.tests/libmng/libmng.pro
+++ b/config.tests/libmng/libmng.pro
@@ -1,4 +1,7 @@
 SOURCES = libmng.cpp
 CONFIG -= qt dylib
 mac:CONFIG -= app_bundle
-LIBS += -lmng
+CONFIG += link_pkgconfig
+packagesExist(libmng):PKGCONFIG += libmng
+else:if(unix|win32-g++*): LIBS += -lmng
+else:win32: LIBS += libmng.lib
diff --git a/src/plugins/imageformats/mng/mng.pro b/src/plugins/imageformats/mng/mng.pro
index 9890c11..7cfcff0 100644
--- a/src/plugins/imageformats/mng/mng.pro
+++ b/src/plugins/imageformats/mng/mng.pro
@@ -8,7 +8,9 @@ HEADERS += qmnghandler_p.h
 SOURCES += qmnghandler.cpp
 OTHER_FILES += mng.json
 config_libmng {
-    unix|win32-g++*: LIBS += -lmng
+    CONFIG += link_pkgconfig
+    packagesExist(libmng):PKGCONFIG += libmng
+    else:if(unix|win32-g++*): LIBS += -lmng
     else:win32: LIBS += libmng.lib
 } else {
     include($$PWD/../../../3rdparty/libmng.pri)
-- 
1.7.10.4