From 58afad0968a2cf2a20c9f0c0da3d6c0fac4673b1 Mon Sep 17 00:00:00 2001 From: Alexander Neundorf Date: Sat, 16 Aug 2008 07:22:59 -0400 Subject: [PATCH] ENH: also search for xmllint, which comes with libxml2 (sync with FindLibXml2.cmake from KDE) Alex --- Modules/FindLibXml2.cmake | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/Modules/FindLibXml2.cmake b/Modules/FindLibXml2.cmake index 0de0586ec..42c554ce3 100644 --- a/Modules/FindLibXml2.cmake +++ b/Modules/FindLibXml2.cmake @@ -1,10 +1,11 @@ # - Try to find LibXml2 # Once done this will define # -# LIBXML2_FOUND - system has LibXml2 -# LIBXML2_INCLUDE_DIR - the LibXml2 include directory -# LIBXML2_LIBRARIES - the libraries needed to use LibXml2 +# LIBXML2_FOUND - System has LibXml2 +# LIBXML2_INCLUDE_DIR - The LibXml2 include directory +# LIBXML2_LIBRARIES - The libraries needed to use LibXml2 # LIBXML2_DEFINITIONS - Compiler switches required for using LibXml2 +# LIBXML2_XMLLINT_EXECUTABLE - The XML checking tool xmllint coming with LibXml2 # Copyright (c) 2006, Alexander Neundorf, # @@ -36,11 +37,15 @@ FIND_LIBRARY(LIBXML2_LIBRARIES NAMES xml2 libxml2 ${_LibXml2LinkDir} ) +FIND_PROGRAM(LIBXML2_XMLLINT_EXECUTABLE xmllint) +# for backwards compat. with KDE 4.0.x: +SET(XMLLINT_EXECUTABLE "${LIBXML2_XMLLINT_EXECUTABLE}") + INCLUDE(FindPackageHandleStandardArgs) # handle the QUIETLY and REQUIRED arguments and set LIBXML2_FOUND to TRUE if # all listed variables are TRUE FIND_PACKAGE_HANDLE_STANDARD_ARGS(LibXml2 DEFAULT_MSG LIBXML2_LIBRARIES LIBXML2_INCLUDE_DIR) -MARK_AS_ADVANCED(LIBXML2_INCLUDE_DIR LIBXML2_LIBRARIES) +MARK_AS_ADVANCED(LIBXML2_INCLUDE_DIR LIBXML2_LIBRARIES LIBXML2_XMLLINT_EXECUTABLE)