summaryrefslogtreecommitdiffstats
path: root/subsurface-configure.pri
diff options
context:
space:
mode:
authorGravatar Lubomir I. Ivanov <neolit123@gmail.com>2013-10-10 01:18:50 +0300
committerGravatar Dirk Hohndel <dirk@hohndel.org>2013-10-09 15:47:29 -0700
commitd63327469bdc80e4fcd3a914d626fbeabe6d4d1b (patch)
tree3aefdd6276e56fafbc7042b9e4e01866d528e5e1 /subsurface-configure.pri
parent19c62bc5097db85aae839d9daa79b9e1f4978d99 (diff)
downloadsubsurface-d63327469bdc80e4fcd3a914d626fbeabe6d4d1b.tar.gz
subsurface-configure.pri: add another libxml/libxslt detection stage
libxml and libxslt use custom -config scripts which brake qmake and make on Win32. The output of executing a .sh or .cmd script with the same name produces garbled output. The output of executables with the same name is untested, but a bit excessive as a solution. To work around the issue add another detection stage, which checks if the previous output from (e.g.) xml2-config is empty and try to use pkg-config instead. Signed-off-by: Lubomir I. Ivanov <neolit123@gmail.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Diffstat (limited to 'subsurface-configure.pri')
-rw-r--r--subsurface-configure.pri9
1 files changed, 9 insertions, 0 deletions
diff --git a/subsurface-configure.pri b/subsurface-configure.pri
index 32d2d1685..043384800 100644
--- a/subsurface-configure.pri
+++ b/subsurface-configure.pri
@@ -73,7 +73,16 @@ 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)
+ XML2_LIBS = $$system(pkg-config --libs libxml2 2> $$NUL)
+ }
+ isEmpty(XSLT_CFLAGS)|isEmpty(XSLT_LIBS) {
+ 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): \