FindXercesC: Find debug and release libraries separately

This commit is contained in:
Roger Leigh 2015-08-07 13:54:34 +00:00 committed by Brad King
parent 17ecfd8210
commit 021bf871a6
2 changed files with 17 additions and 4 deletions

View File

@ -0,0 +1,5 @@
FindXercesC-updates
-------------------
* The :module:`FindXercesC` module learned to search separately for
debug and release variants.

View File

@ -61,10 +61,18 @@ find_path(XercesC_INCLUDE_DIR
DOC "Xerces-C++ include directory") DOC "Xerces-C++ include directory")
mark_as_advanced(XercesC_INCLUDE_DIR) mark_as_advanced(XercesC_INCLUDE_DIR)
if(NOT XercesC_LIBRARY)
# Find all XercesC libraries # Find all XercesC libraries
find_library(XercesC_LIBRARY NAMES "xerces-c" "xerces-c_3" "xerces-c_2" find_library(XercesC_LIBRARY_RELEASE
DOC "Xerces-C++ libraries") NAMES "xerces-c" "xerces-c_3"
mark_as_advanced(XercesC_LIBRARY) 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) if(XercesC_INCLUDE_DIR)
_XercesC_GET_VERSION("${XercesC_INCLUDE_DIR}/xercesc/util/XercesVersion.hpp") _XercesC_GET_VERSION("${XercesC_INCLUDE_DIR}/xercesc/util/XercesVersion.hpp")