BUG: use FindPkgConfig.cmake instead of UsePkgConfig.cmake, sync with KDE
svn and fix bug #8290 Alex
This commit is contained in:
parent
baf324abd8
commit
903b0a8150
|
@ -21,20 +21,22 @@ ENDIF (LIBXML2_INCLUDE_DIR AND LIBXML2_LIBRARIES)
|
||||||
IF (NOT WIN32)
|
IF (NOT WIN32)
|
||||||
# use pkg-config to get the directories and then use these values
|
# use pkg-config to get the directories and then use these values
|
||||||
# in the FIND_PATH() and FIND_LIBRARY() calls
|
# in the FIND_PATH() and FIND_LIBRARY() calls
|
||||||
INCLUDE(UsePkgConfig)
|
FIND_PACKAGE(PkgConfig)
|
||||||
PKGCONFIG(libxml-2.0 _LibXml2IncDir _LibXml2LinkDir _LibXml2LinkFlags _LibXml2Cflags)
|
PKG_CHECK_MODULES(PC_LIBXML libxml-2.0)
|
||||||
SET(LIBXML2_DEFINITIONS ${_LibXml2Cflags})
|
SET(LIBXML2_DEFINITIONS ${PC_LIBXML_CFLAGS_OTHER})
|
||||||
ENDIF (NOT WIN32)
|
ENDIF (NOT WIN32)
|
||||||
|
|
||||||
FIND_PATH(LIBXML2_INCLUDE_DIR libxml/xpath.h
|
FIND_PATH(LIBXML2_INCLUDE_DIR libxml/xpath.h
|
||||||
PATHS
|
HINTS
|
||||||
${_LibXml2IncDir}
|
${PC_LIBXML_INCLUDEDIR}
|
||||||
|
${PC_LIBXML_INCLUDE_DIRS}
|
||||||
PATH_SUFFIXES libxml2
|
PATH_SUFFIXES libxml2
|
||||||
)
|
)
|
||||||
|
|
||||||
FIND_LIBRARY(LIBXML2_LIBRARIES NAMES xml2 libxml2
|
FIND_LIBRARY(LIBXML2_LIBRARIES NAMES xml2 libxml2
|
||||||
PATHS
|
HINTS
|
||||||
${_LibXml2LinkDir}
|
${PC_LIBXML_LIBDIR}
|
||||||
|
${PC_LIBXML_LIBRARY_DIRS}
|
||||||
)
|
)
|
||||||
|
|
||||||
FIND_PROGRAM(LIBXML2_XMLLINT_EXECUTABLE xmllint)
|
FIND_PROGRAM(LIBXML2_XMLLINT_EXECUTABLE xmllint)
|
||||||
|
|
Loading…
Reference in New Issue