diff options
author | Roger Leigh <rleigh@codelibre.net> | 2018-08-03 06:54:35 (GMT) |
---|---|---|
committer | Roger Leigh <rleigh@codelibre.net> | 2018-08-03 06:54:35 (GMT) |
commit | 00a5836a3de046aa910aee7ec3e015b155790422 (patch) | |
tree | 7cd32c059cde7a46ac04ba664e3e17a2e891b014 /Modules | |
parent | ce309b624aaa756c802a3dfc581c410578f77d3b (diff) | |
download | CMake-00a5836a3de046aa910aee7ec3e015b155790422.zip CMake-00a5836a3de046aa910aee7ec3e015b155790422.tar.gz CMake-00a5836a3de046aa910aee7ec3e015b155790422.tar.bz2 |
FindXercesC: Correct order of version detection and versioned library checks
Diffstat (limited to 'Modules')
-rw-r--r-- | Modules/FindXercesC.cmake | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/Modules/FindXercesC.cmake b/Modules/FindXercesC.cmake index 267c164..55db7ae 100644 --- a/Modules/FindXercesC.cmake +++ b/Modules/FindXercesC.cmake @@ -73,6 +73,10 @@ find_path(XercesC_INCLUDE_DIR DOC "Xerces-C++ include directory") mark_as_advanced(XercesC_INCLUDE_DIR) +if(XercesC_INCLUDE_DIR) + _XercesC_GET_VERSION("${XercesC_INCLUDE_DIR}/xercesc/util/XercesVersion.hpp") +endif() + if(NOT XercesC_LIBRARY) # Find all XercesC libraries find_library(XercesC_LIBRARY_RELEASE @@ -90,10 +94,6 @@ 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() - include(${CMAKE_CURRENT_LIST_DIR}/FindPackageHandleStandardArgs.cmake) FIND_PACKAGE_HANDLE_STANDARD_ARGS(XercesC FOUND_VAR XercesC_FOUND |