summaryrefslogtreecommitdiffstats
path: root/Modules/FindLibXml2.cmake
diff options
context:
space:
mode:
authorAlexander Neundorf <neundorf@kde.org>2008-12-22 08:00:08 (GMT)
committerAlexander Neundorf <neundorf@kde.org>2008-12-22 08:00:08 (GMT)
commit903b0a81505d7852694e352967cea0bea691953d (patch)
tree79ab7bcf9057de1366e8cdb6abec5dd2c3314004 /Modules/FindLibXml2.cmake
parentbaf324abd83f07366084b7d52ed48a204252d44c (diff)
downloadCMake-903b0a81505d7852694e352967cea0bea691953d.zip
CMake-903b0a81505d7852694e352967cea0bea691953d.tar.gz
CMake-903b0a81505d7852694e352967cea0bea691953d.tar.bz2
BUG: use FindPkgConfig.cmake instead of UsePkgConfig.cmake, sync with KDE
svn and fix bug #8290 Alex
Diffstat (limited to 'Modules/FindLibXml2.cmake')
-rw-r--r--Modules/FindLibXml2.cmake16
1 files changed, 9 insertions, 7 deletions
diff --git a/Modules/FindLibXml2.cmake b/Modules/FindLibXml2.cmake
index 42c554c..c5efc72 100644
--- a/Modules/FindLibXml2.cmake
+++ b/Modules/FindLibXml2.cmake
@@ -21,20 +21,22 @@ ENDIF (LIBXML2_INCLUDE_DIR AND LIBXML2_LIBRARIES)
IF (NOT WIN32)
# use pkg-config to get the directories and then use these values
# in the FIND_PATH() and FIND_LIBRARY() calls
- INCLUDE(UsePkgConfig)
- PKGCONFIG(libxml-2.0 _LibXml2IncDir _LibXml2LinkDir _LibXml2LinkFlags _LibXml2Cflags)
- SET(LIBXML2_DEFINITIONS ${_LibXml2Cflags})
+ FIND_PACKAGE(PkgConfig)
+ PKG_CHECK_MODULES(PC_LIBXML libxml-2.0)
+ SET(LIBXML2_DEFINITIONS ${PC_LIBXML_CFLAGS_OTHER})
ENDIF (NOT WIN32)
FIND_PATH(LIBXML2_INCLUDE_DIR libxml/xpath.h
- PATHS
- ${_LibXml2IncDir}
+ HINTS
+ ${PC_LIBXML_INCLUDEDIR}
+ ${PC_LIBXML_INCLUDE_DIRS}
PATH_SUFFIXES libxml2
)
FIND_LIBRARY(LIBXML2_LIBRARIES NAMES xml2 libxml2
- PATHS
- ${_LibXml2LinkDir}
+ HINTS
+ ${PC_LIBXML_LIBDIR}
+ ${PC_LIBXML_LIBRARY_DIRS}
)
FIND_PROGRAM(LIBXML2_XMLLINT_EXECUTABLE xmllint)