diff options
Diffstat (limited to 'modules/FindSoprano.cmake')
-rw-r--r-- | modules/FindSoprano.cmake | 61 |
1 files changed, 33 insertions, 28 deletions
diff --git a/modules/FindSoprano.cmake b/modules/FindSoprano.cmake index 096d9b3f..c2b4774c 100644 --- a/modules/FindSoprano.cmake +++ b/modules/FindSoprano.cmake @@ -14,42 +14,47 @@ else(SOPRANO_INCLUDE_DIR AND SOPRANO_LIBRARIES) ${KDE4_INCLUDE_DIR} ${INCLUDE_INSTALL_DIR} ) - - FIND_LIBRARY(SOPRANO_LIBRARIES - NAMES - soprano - PATHS - ${KDE4_LIB_DIR} - ${LIB_INSTALL_DIR} - ) - if(SOPRANO_INCLUDE_DIR AND SOPRANO_LIBRARIES) - set(Soprano_FOUND TRUE) - endif(SOPRANO_INCLUDE_DIR AND SOPRANO_LIBRARIES) if(MSVC) - FIND_LIBRARY(SOPRANO_LIBRARIES_DEBUG + FIND_LIBRARY(SOPRANO_LIBRARIES_DEBUG NAMES sopranod PATHS ${KDE4_LIB_DIR} ${LIB_INSTALL_DIR} - ) - if(NOT SOPRANO_LIBRARIES_DEBUG) - set(Soprano_FOUND FALSE) - endif(NOT SOPRANO_LIBRARIES_DEBUG) - - if(MSVC_IDE) - if( NOT SOPRANO_LIBRARIES_DEBUG OR NOT SOPRANO_LIBRARIES) - message(FATAL_ERROR "\nCould NOT find the debug AND release version of the Soprano library.\nYou need to have both to use MSVC projects.\nPlease build and install both soprano libraries first.\n") - endif( NOT SOPRANO_LIBRARIES_DEBUG OR NOT SOPRANO_LIBRARIES) - else(MSVC_IDE) - string(TOLOWER ${CMAKE_BUILD_TYPE} CMAKE_BUILD_TYPE_TOLOWER) - if(CMAKE_BUILD_TYPE_TOLOWER MATCHES debug) + ) + FIND_LIBRARY(SOPRANO_LIBRARIES_RELEASE + NAMES + soprano + PATHS + ${KDE4_LIB_DIR} + ${LIB_INSTALL_DIR} + ) + + if(SOPRANO_LIBRARIES_DEBUG AND SOPRANO_LIBRARIES_RELEASE) + set(SOPRANO_LIBRARIES optimized ${SOPRANO_LIBRARIES_RELEASE} + debug ${SOPRANO_LIBRARIES_DEBUG}) + else(SOPRANO_LIBRARIES_DEBUG AND SOPRANO_LIBRARIES_RELEASE) + if(SOPRANO_LIBRARIES_DEBUG) set(SOPRANO_LIBRARIES ${SOPRANO_LIBRARIES_DEBUG}) - else(CMAKE_BUILD_TYPE_TOLOWER MATCHES debug) - set(SOPRANO_LIBRARIES ${SOPRANO_LIBRARIES}) - endif(CMAKE_BUILD_TYPE_TOLOWER MATCHES debug) - endif(MSVC_IDE) + else(SOPRANO_LIBRARIES_DEBUG) + if(SOPRANO_LIBRARIES_RELEASE) + set(SOPRANO_LIBRARIES ${SOPRANO_LIBRARIES_RELEASE}) + endif(SOPRANO_LIBRARIES_RELEASE) + endif(SOPRANO_LIBRARIES_DEBUG) + endif(SOPRANO_LIBRARIES_DEBUG AND SOPRANO_LIBRARIES_RELEASE) + + else(MSVC) + FIND_LIBRARY(SOPRANO_LIBRARIES + NAMES + soprano + PATHS + ${KDE4_LIB_DIR} + ${LIB_INSTALL_DIR} + ) + if(SOPRANO_INCLUDE_DIR AND SOPRANO_LIBRARIES) + set(Soprano_FOUND TRUE) + endif(SOPRANO_INCLUDE_DIR AND SOPRANO_LIBRARIES) endif(MSVC) if(Soprano_FOUND) |