diff options
author | Brad King <brad.king@kitware.com> | 2018-07-16 12:21:49 (GMT) |
---|---|---|
committer | Kitware Robot <kwrobot@kitware.com> | 2018-07-16 12:21:55 (GMT) |
commit | 4b00e57de8aaed500de945411912b828892e84d3 (patch) | |
tree | 502e3cd1eb090cc939cbf7cc9d1cf1fa198b4712 /Modules | |
parent | 992e9d10f818ead64f08b435432a6c5b5a0f6916 (diff) | |
parent | 82f39c9ce9e9ce9827b4a27abf3f6a1af427a5d2 (diff) | |
download | CMake-4b00e57de8aaed500de945411912b828892e84d3.zip CMake-4b00e57de8aaed500de945411912b828892e84d3.tar.gz CMake-4b00e57de8aaed500de945411912b828892e84d3.tar.bz2 |
Merge topic 'FindXercesC-versioned-names'
82f39c9ce9 FindXercesC: Search for version-named library files
Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: Roger Leigh <rleigh@codelibre.net>
Merge-request: !2210
Diffstat (limited to 'Modules')
-rw-r--r-- | Modules/FindXercesC.cmake | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/Modules/FindXercesC.cmake b/Modules/FindXercesC.cmake index 51e68d5..267c164 100644 --- a/Modules/FindXercesC.cmake +++ b/Modules/FindXercesC.cmake @@ -59,6 +59,9 @@ function(_XercesC_GET_VERSION version_hdr) endif() set(XercesC_VERSION "${XercesC_MAJOR}.${XercesC_MINOR}.${XercesC_PATCH}" PARENT_SCOPE) + set(XercesC_VERSION_MAJOR "${XercesC_MAJOR}" PARENT_SCOPE) + set(XercesC_VERSION_MINOR "${XercesC_MINOR}" PARENT_SCOPE) + set(XercesC_VERSION_PATCH "${XercesC_PATCH}" PARENT_SCOPE) else() message(FATAL_ERROR "Include file ${version_hdr} does not exist or does not contain expected version information") endif() @@ -73,16 +76,20 @@ mark_as_advanced(XercesC_INCLUDE_DIR) if(NOT XercesC_LIBRARY) # Find all XercesC libraries find_library(XercesC_LIBRARY_RELEASE - NAMES "xerces-c" "xerces-c_3" + NAMES "xerces-c" "xerces-c_${XercesC_VERSION_MAJOR}" DOC "Xerces-C++ libraries (release)") find_library(XercesC_LIBRARY_DEBUG - NAMES "xerces-cd" "xerces-c_3D" "xerces-c_3_1D" + NAMES "xerces-cd" "xerces-c_${XercesC_VERSION_MAJOR}D" "xerces-c_${XercesC_VERSION_MAJOR}_${XercesC_VERSION_MINOR}D" DOC "Xerces-C++ libraries (debug)") include(${CMAKE_CURRENT_LIST_DIR}/SelectLibraryConfigurations.cmake) select_library_configurations(XercesC) mark_as_advanced(XercesC_LIBRARY_RELEASE XercesC_LIBRARY_DEBUG) endif() +unset(XercesC_VERSION_MAJOR) +unset(XercesC_VERSION_MINOR) +unset(XercesC_VERSION_PATCH) + if(XercesC_INCLUDE_DIR) _XercesC_GET_VERSION("${XercesC_INCLUDE_DIR}/xercesc/util/XercesVersion.hpp") endif() |