diff options
author | David Cole <david.cole@kitware.com> | 2012-01-25 16:18:18 (GMT) |
---|---|---|
committer | CMake Topic Stage <kwrobot@kitware.com> | 2012-01-25 16:18:18 (GMT) |
commit | 825b9dde3d391169ad0546b4458f1d3e1bc88756 (patch) | |
tree | d7ddebb4ad0c20c55ac93defe8f26775fd3b2ab0 /Modules/FindLibXml2.cmake | |
parent | 5ee225dbbd500ac316ce9750d7b5a9f4a8692c43 (diff) | |
parent | a5fd3915c9a0562f1e97aa38692ade0200c8ba28 (diff) | |
download | CMake-825b9dde3d391169ad0546b4458f1d3e1bc88756.zip CMake-825b9dde3d391169ad0546b4458f1d3e1bc88756.tar.gz CMake-825b9dde3d391169ad0546b4458f1d3e1bc88756.tar.bz2 |
Merge topic 'improve-libxml2'
a5fd391 FindLibXml2: support version selection
Diffstat (limited to 'Modules/FindLibXml2.cmake')
-rw-r--r-- | Modules/FindLibXml2.cmake | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/Modules/FindLibXml2.cmake b/Modules/FindLibXml2.cmake index 396d810..a797b12 100644 --- a/Modules/FindLibXml2.cmake +++ b/Modules/FindLibXml2.cmake @@ -6,6 +6,7 @@ # 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 +# LIBXML2_VERSION_STRING - the version of LibXml2 found (since CMake 2.8.8) #============================================================================= # Copyright 2006-2009 Kitware, Inc. @@ -47,7 +48,12 @@ SET(XMLLINT_EXECUTABLE "${LIBXML2_XMLLINT_EXECUTABLE}") # handle the QUIETLY and REQUIRED arguments and set LIBXML2_FOUND to TRUE if # all listed variables are TRUE INCLUDE(${CMAKE_CURRENT_LIST_DIR}/FindPackageHandleStandardArgs.cmake) -FIND_PACKAGE_HANDLE_STANDARD_ARGS(LibXml2 DEFAULT_MSG LIBXML2_LIBRARIES LIBXML2_INCLUDE_DIR) +FIND_PACKAGE_HANDLE_STANDARD_ARGS(LibXml2 + REQUIRED_VARS LIBXML2_LIBRARIES LIBXML2_INCLUDE_DIR + VERSION_VAR PC_LIBXML_VERSION) -MARK_AS_ADVANCED(LIBXML2_INCLUDE_DIR LIBXML2_LIBRARIES LIBXML2_XMLLINT_EXECUTABLE) +IF(LIBXML2_FOUND) + SET(LIBXML2_VERSION_STRING ${PC_LIBXML_VERSION}) +ENDIF() +MARK_AS_ADVANCED(LIBXML2_INCLUDE_DIR LIBXML2_LIBRARIES LIBXML2_XMLLINT_EXECUTABLE) |