mirror of
https://github.com/subsurface/subsurface.git
synced 2025-02-19 22:16:15 +00:00
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>
This commit is contained in:
parent
9060558a7d
commit
0ae7c820f2
1 changed files with 13 additions and 9 deletions
|
@ -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
|
# run them. They also come with pkg-config files, but those are missing on
|
||||||
# Mac (where they are part of the XCode-supplied tools).
|
# 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 {
|
link_pkgconfig {
|
||||||
isEmpty(XML2_CFLAGS)|isEmpty(XML2_LIBS) {
|
isEmpty(XML2_CFLAGS)|isEmpty(XML2_LIBS) {
|
||||||
XML2_CFLAGS = $$system($$PKG_CONFIG --cflags libxml2 2> $$NUL)
|
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_CFLAGS = $$system($$PKG_CONFIG --cflags libxslt 2> $$NUL)
|
||||||
XSLT_LIBS = $$system($$PKG_CONFIG --libs 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_CFLAGS *= $$XML2_CFLAGS $$XSLT_CFLAGS
|
||||||
QMAKE_CXXFLAGS *= $$XML2_CFLAGS $$XSLT_CFLAGS
|
QMAKE_CXXFLAGS *= $$XML2_CFLAGS $$XSLT_CFLAGS
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue