summaryrefslogtreecommitdiffstats
path: root/Modules/FindXercesC.cmake
diff options
context:
space:
mode:
authorRoger Leigh <rleigh@codelibre.net>2018-08-03 06:54:35 (GMT)
committerRoger Leigh <rleigh@codelibre.net>2018-08-03 06:54:35 (GMT)
commit00a5836a3de046aa910aee7ec3e015b155790422 (patch)
tree7cd32c059cde7a46ac04ba664e3e17a2e891b014 /Modules/FindXercesC.cmake
parentce309b624aaa756c802a3dfc581c410578f77d3b (diff)
downloadCMake-00a5836a3de046aa910aee7ec3e015b155790422.zip
CMake-00a5836a3de046aa910aee7ec3e015b155790422.tar.gz
CMake-00a5836a3de046aa910aee7ec3e015b155790422.tar.bz2
FindXercesC: Correct order of version detection and versioned library checks
Diffstat (limited to 'Modules/FindXercesC.cmake')
-rw-r--r--Modules/FindXercesC.cmake8
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