summaryrefslogtreecommitdiffstats
path: root/subsurface-configure.pri
diff options
context:
space:
mode:
authorGravatar Thiago Macieira <thiago@macieira.org>2014-02-01 19:26:53 -0800
committerGravatar Dirk Hohndel <dirk@hohndel.org>2014-02-02 07:07:33 -0800
commit0ae7c820f24a4f0609fc0f08e425f0a506cf5d92 (patch)
tree3534c25676535c7b90a1531c720e3b0f69235a25 /subsurface-configure.pri
parent9060558a7da73af9edf2f519e24c2ffe0259cde0 (diff)
downloadsubsurface-0ae7c820f24a4f0609fc0f08e425f0a506cf5d92.tar.gz
Search pkg-config before {xml2,xslt}-config
Cross-compilation tools provide the right .pc files and a pkg-config to match, but often don't provide the scripts to match. Even if they did, you'd have to change PATH to find them. So give pkg-config precedence. Signed-off-by: Thiago Macieira <thiago@macieira.org> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Diffstat (limited to 'subsurface-configure.pri')
-rw-r--r--subsurface-configure.pri22
1 files changed, 13 insertions, 9 deletions
diff --git a/subsurface-configure.pri b/subsurface-configure.pri
index 2df831d31..8e6aeadb8 100644
--- a/subsurface-configure.pri
+++ b/subsurface-configure.pri
@@ -89,11 +89,6 @@ PKG_CONFIG_OUT = $$system($$PKG_CONFIG --version 2> $$NUL)
# run them. They also come with pkg-config files, but those are missing on
# Mac (where they are part of the XCode-supplied tools).
#
-XML2_CFLAGS = $$system(xml2-config --cflags 2>$$NUL)
-XSLT_CFLAGS = $$system(xslt-config --cflags 2>$$NUL)
-XML2_LIBS = $$system(xml2-config --libs 2>$$NUL)
-XSLT_LIBS = $$system(xslt-config --libs 2>$$NUL)
-
link_pkgconfig {
isEmpty(XML2_CFLAGS)|isEmpty(XML2_LIBS) {
XML2_CFLAGS = $$system($$PKG_CONFIG --cflags libxml2 2> $$NUL)
@@ -107,11 +102,20 @@ link_pkgconfig {
XSLT_CFLAGS = $$system($$PKG_CONFIG --cflags libxslt 2> $$NUL)
XSLT_LIBS = $$system($$PKG_CONFIG --libs libxslt 2> $$NUL)
}
- isEmpty(XML2_CFLAGS)|isEmpty(XML2_LIBS): \
- error("Could not find libxml2. Did you forget to install it?")
- isEmpty(XSLT_CFLAGS)|isEmpty(XSLT_LIBS): \
- error("Could not find libxslt. Did you forget to install it?")
}
+isEmpty(XML2_CFLAGS)|isEmpty(XML2_LIBS) {
+ XML2_CFLAGS = $$system(xml2-config --cflags 2>$$NUL)
+ XML2_LIBS = $$system(xml2-config --libs 2>$$NUL)
+}
+isEmpty(XSLT_CFLAGS)|isEmpty(XSLT_LIBS) {
+ XSLT_CFLAGS = $$system(xslt-config --cflags 2>$$NUL)
+ XSLT_LIBS = $$system(xslt-config --libs 2>$$NUL)
+}
+isEmpty(XML2_CFLAGS)|isEmpty(XML2_LIBS): \
+ error("Could not find libxml2. Did you forget to install it?")
+isEmpty(XSLT_CFLAGS)|isEmpty(XSLT_LIBS): \
+ error("Could not find libxslt. Did you forget to install it?")
+
QMAKE_CFLAGS *= $$XML2_CFLAGS $$XSLT_CFLAGS
QMAKE_CXXFLAGS *= $$XML2_CFLAGS $$XSLT_CFLAGS