aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--modules/FindSoprano.cmake29
1 files changed, 28 insertions, 1 deletions
diff --git a/modules/FindSoprano.cmake b/modules/FindSoprano.cmake
index cb0c57ec..2aa05865 100644
--- a/modules/FindSoprano.cmake
+++ b/modules/FindSoprano.cmake
@@ -26,11 +26,38 @@ else(SOPRANO_INCLUDE_DIR AND SOPRANO_LIBRARIES)
${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
+ NAMES
+ sopranod
+ PATHS
+ /usr/lib
+ /usr/local/lib
+ ${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)
+ 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)
+ endif(MSVC)
+
if(Soprano_FOUND)
if(NOT Soprano_FIND_QUIETLY)
message(STATUS "Found Soprano: ${SOPRANO_LIBRARIES}")