summaryrefslogtreecommitdiffstats
path: root/Modules/FindLibXml2.cmake
diff options
context:
space:
mode:
authorAlexander Neundorf <neundorf@kde.org>2007-07-18 17:26:02 (GMT)
committerAlexander Neundorf <neundorf@kde.org>2007-07-18 17:26:02 (GMT)
commite118a62709fdc84e6c5b5b8d0bb055895d206ec9 (patch)
tree20e404d46f0b10d66af046e53f8af0843d88a6cc /Modules/FindLibXml2.cmake
parentff9ed18dad7281c074ce80befa47d7d510d4476b (diff)
downloadCMake-e118a62709fdc84e6c5b5b8d0bb055895d206ec9.zip
CMake-e118a62709fdc84e6c5b5b8d0bb055895d206ec9.tar.gz
CMake-e118a62709fdc84e6c5b5b8d0bb055895d206ec9.tar.bz2
ENH: add a macro FIND_PACKAGE_HANDLE_STANDARD_ARGS(LibXml2 LIBXML2_LIBRARIES LIBXML2_INCLUDE_DIR)
which handles the required and QUIET arguments and sets <NAME>_FOUND Alex
Diffstat (limited to 'Modules/FindLibXml2.cmake')
-rw-r--r--Modules/FindLibXml2.cmake18
1 files changed, 4 insertions, 14 deletions
diff --git a/Modules/FindLibXml2.cmake b/Modules/FindLibXml2.cmake
index 47136df..93507e6 100644
--- a/Modules/FindLibXml2.cmake
+++ b/Modules/FindLibXml2.cmake
@@ -36,21 +36,11 @@ FIND_LIBRARY(LIBXML2_LIBRARIES NAMES xml2 libxml2
${_LibXml2LinkDir}
)
-IF (LIBXML2_INCLUDE_DIR AND LIBXML2_LIBRARIES)
- SET(LIBXML2_FOUND TRUE)
-ELSE (LIBXML2_INCLUDE_DIR AND LIBXML2_LIBRARIES)
- SET(LIBXML2_FOUND FALSE)
-ENDIF (LIBXML2_INCLUDE_DIR AND LIBXML2_LIBRARIES)
+INCLUDE(FindPackageHandleStandardArgs)
-IF (LIBXML2_FOUND)
- IF (NOT LibXml2_FIND_QUIETLY)
- MESSAGE(STATUS "Found LibXml2: ${LIBXML2_LIBRARIES}")
- ENDIF (NOT LibXml2_FIND_QUIETLY)
-ELSE (LIBXML2_FOUND)
- IF (LibXml2_FIND_REQUIRED)
- MESSAGE(SEND_ERROR "Could NOT find LibXml2")
- ENDIF (LibXml2_FIND_REQUIRED)
-ENDIF (LIBXML2_FOUND)
+# handle the QUIETLY and REQUIRED arguments and set LIBXML2_FOUND to TRUE if
+# all listed variables are TRUE
+FIND_PACKAGE_HANDLE_STANDARD_ARGS(LibXml2 LIBXML2_LIBRARIES LIBXML2_INCLUDE_DIR)
MARK_AS_ADVANCED(LIBXML2_INCLUDE_DIR LIBXML2_LIBRARIES)