summaryrefslogtreecommitdiff
path: root/Modules/FindLibXml2.cmake
diff options
context:
space:
mode:
authorAlexander Neundorf <neundorf@kde.org>2009-11-22 05:51:38 -0500
committerAlexander Neundorf <neundorf@kde.org>2009-11-22 05:51:38 -0500
commita10198c54e1e9a3798360ffc253325f9f643e272 (patch)
treee30bec47c0eccdcdbead0552dcc56b578bae7e38 /Modules/FindLibXml2.cmake
parent2d9c72c7e50e64baa8ce3905c079f067ee64f806 (diff)
downloadcmake-a10198c54e1e9a3798360ffc253325f9f643e272.tar.gz
don't use deprecated UsePkgConfig.cmake file in FindLibXslt.cmake, some cosmetics
-use find_package(PkgConfig) instead of include(UsePkgConfig) -remove the "if already cached make silent" logic, this is already handled by find_package_handle_standard_args() -remove the if(WIN32) around pkg-config, it shouldn't be necessary Alex
Diffstat (limited to 'Modules/FindLibXml2.cmake')
-rw-r--r--Modules/FindLibXml2.cmake21
1 files changed, 7 insertions, 14 deletions
diff --git a/Modules/FindLibXml2.cmake b/Modules/FindLibXml2.cmake
index fc4c23d3a8..9139aad797 100644
--- a/Modules/FindLibXml2.cmake
+++ b/Modules/FindLibXml2.cmake
@@ -1,4 +1,4 @@
-# - Try to find LibXml2
+# - Try to find the LibXml2 xml processing library
# Once done this will define
#
# LIBXML2_FOUND - System has LibXml2
@@ -21,20 +21,13 @@
# (To distributed this file outside of CMake, substitute the full
# License text for the above reference.)
-IF (LIBXML2_INCLUDE_DIR AND LIBXML2_LIBRARIES)
- # in cache already
- SET(LibXml2_FIND_QUIETLY TRUE)
-ENDIF (LIBXML2_INCLUDE_DIR AND LIBXML2_LIBRARIES)
+# use pkg-config to get the directories and then use these values
+# in the FIND_PATH() and FIND_LIBRARY() calls
+FIND_PACKAGE(PkgConfig)
+PKG_CHECK_MODULES(PC_LIBXML libxml-2.0)
+SET(LIBXML2_DEFINITIONS ${PC_LIBXML_CFLAGS_OTHER})
-IF (NOT WIN32)
- # use pkg-config to get the directories and then use these values
- # in the FIND_PATH() and FIND_LIBRARY() calls
- 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
+FIND_PATH(LIBXML2_INCLUDE_DIR NAMES libxml/xpath.h
HINTS
${PC_LIBXML_INCLUDEDIR}
${PC_LIBXML_INCLUDE_DIRS}