From 021bf871a6ffa51b6bd0f5834e8a5049c54f8b30 Mon Sep 17 00:00:00 2001 From: Roger Leigh Date: Fri, 7 Aug 2015 13:54:34 +0000 Subject: FindXercesC: Find debug and release libraries separately --- Help/release/dev/FindXercesC-updates.rst | 5 +++++ Modules/FindXercesC.cmake | 16 ++++++++++++---- 2 files changed, 17 insertions(+), 4 deletions(-) create mode 100644 Help/release/dev/FindXercesC-updates.rst diff --git a/Help/release/dev/FindXercesC-updates.rst b/Help/release/dev/FindXercesC-updates.rst new file mode 100644 index 0000000..47a8ada --- /dev/null +++ b/Help/release/dev/FindXercesC-updates.rst @@ -0,0 +1,5 @@ +FindXercesC-updates +------------------- + +* The :module:`FindXercesC` module learned to search separately for + debug and release variants. diff --git a/Modules/FindXercesC.cmake b/Modules/FindXercesC.cmake index fd0b992..23919c7 100644 --- a/Modules/FindXercesC.cmake +++ b/Modules/FindXercesC.cmake @@ -61,10 +61,18 @@ find_path(XercesC_INCLUDE_DIR DOC "Xerces-C++ include directory") mark_as_advanced(XercesC_INCLUDE_DIR) -# Find all XercesC libraries -find_library(XercesC_LIBRARY NAMES "xerces-c" "xerces-c_3" "xerces-c_2" - DOC "Xerces-C++ libraries") -mark_as_advanced(XercesC_LIBRARY) +if(NOT XercesC_LIBRARY) + # Find all XercesC libraries + find_library(XercesC_LIBRARY_RELEASE + NAMES "xerces-c" "xerces-c_3" + DOC "Xerces-C++ libraries (release)") + find_library(XercesC_LIBRARY_DEBUG + NAMES "xerces-cd" "xerces-c_3D" + 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() if(XercesC_INCLUDE_DIR) _XercesC_GET_VERSION("${XercesC_INCLUDE_DIR}/xercesc/util/XercesVersion.hpp") -- cgit v0.12 From db292564293ce6899728fa172614d4eec59b429f Mon Sep 17 00:00:00 2001 From: Roger Leigh Date: Thu, 13 Aug 2015 15:37:41 +0000 Subject: FindXercesC: Add support for 3D_1 variant of the library This version is generated by the Windows Visual Studio project files for unknown reasons, but is required to pick up the debug version of the library created by current versions of Xerces-C. --- Modules/FindXercesC.cmake | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Modules/FindXercesC.cmake b/Modules/FindXercesC.cmake index 23919c7..cf84826 100644 --- a/Modules/FindXercesC.cmake +++ b/Modules/FindXercesC.cmake @@ -67,7 +67,7 @@ if(NOT XercesC_LIBRARY) NAMES "xerces-c" "xerces-c_3" DOC "Xerces-C++ libraries (release)") find_library(XercesC_LIBRARY_DEBUG - NAMES "xerces-cd" "xerces-c_3D" + NAMES "xerces-cd" "xerces-c_3D" "xerces-c_3_1D" DOC "Xerces-C++ libraries (debug)") include(${CMAKE_CURRENT_LIST_DIR}/SelectLibraryConfigurations.cmake) select_library_configurations(XercesC) -- cgit v0.12