From 00a5836a3de046aa910aee7ec3e015b155790422 Mon Sep 17 00:00:00 2001 From: Roger Leigh Date: Fri, 3 Aug 2018 07:54:35 +0100 Subject: FindXercesC: Correct order of version detection and versioned library checks --- Modules/FindXercesC.cmake | 8 ++++---- 1 file 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 -- cgit v0.12