summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--Help/release/dev/FindXercesC-updates.rst5
-rw-r--r--Modules/FindXercesC.cmake16
2 files changed, 17 insertions, 4 deletions
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")