diff options
author | Roger Leigh <rleigh@dundee.ac.uk> | 2015-08-07 13:54:34 (GMT) |
---|---|---|
committer | Brad King <brad.king@kitware.com> | 2015-08-14 13:52:36 (GMT) |
commit | 021bf871a6ffa51b6bd0f5834e8a5049c54f8b30 (patch) | |
tree | dbf5a80e9329240a8bf67563d9efe83911cddac3 /Modules | |
parent | 17ecfd8210b4db74753c4565b10a2b75dfa4c480 (diff) | |
download | CMake-021bf871a6ffa51b6bd0f5834e8a5049c54f8b30.zip CMake-021bf871a6ffa51b6bd0f5834e8a5049c54f8b30.tar.gz CMake-021bf871a6ffa51b6bd0f5834e8a5049c54f8b30.tar.bz2 |
FindXercesC: Find debug and release libraries separately
Diffstat (limited to 'Modules')
-rw-r--r-- | Modules/FindXercesC.cmake | 16 |
1 files changed, 12 insertions, 4 deletions
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") |