diff options
Diffstat (limited to 'modules/FindStrigi.cmake')
-rw-r--r-- | modules/FindStrigi.cmake | 59 |
1 files changed, 47 insertions, 12 deletions
diff --git a/modules/FindStrigi.cmake b/modules/FindStrigi.cmake index 55fec492..1a323706 100644 --- a/modules/FindStrigi.cmake +++ b/modules/FindStrigi.cmake @@ -20,19 +20,54 @@ find_path(STRIGI_INCLUDE_DIR strigi/streamanalyzer.h ${_program_FILES_DIR}/strigi/include ) -find_library(STRIGI_STREAMANALYZER_LIBRARY NAMES streamanalyzer - PATHS - $ENV{STRIGI_HOME}/lib - ${CMAKE_INSTALL_PREFIX}/lib - ${_program_FILES_DIR}/strigi/lib -) +if(MSVC) + FIND_LIBRARY(STREAMANALYZER_LIBRARY_DEBUG NAMES streamanalyzerd) + FIND_LIBRARY(STREAMANALYZER_LIBRARY_RELEASE NAMES streamanalyzer) -find_library(STRIGI_STREAMS_LIBRARY NAMES streams - PATHS - $ENV{STRIGI_HOME}/lib - ${CMAKE_INSTALL_PREFIX}/lib - ${_program_FILES_DIR}/strigi/lib -) + if(STREAMANALYZER_LIBRARY_DEBUG AND STREAMANALYZER_LIBRARY_RELEASE) + set(STREAMANALYZER_LIBRARY optimized ${STREAMANALYZER_LIBRARY_RELEASE} + debug ${STREAMANALYZER_LIBRARY_DEBUG}) + else(STREAMANALYZER_LIBRARY_DEBUG AND STREAMANALYZER_LIBRARY_RELEASE) + if(STREAMANALYZER_LIBRARY_DEBUG) + set(STREAMANALYZER_LIBRARY ${STREAMANALYZER_LIBRARY_DEBUG}) + else(STREAMANALYZER_LIBRARY_DEBUG) + if(STREAMANALYZER_LIBRARY_RELEASE) + set(STREAMANALYZER_LIBRARY ${STREAMANALYZER_LIBRARY_RELEASE}) + endif(STREAMANALYZER_LIBRARY_RELEASE) + endif(STREAMANALYZER_LIBRARY_DEBUG) + endif(STREAMANALYZER_LIBRARY_DEBUG AND STREAMANALYZER_LIBRARY_RELEASE) + + FIND_LIBRARY(STREAMS_LIBRARY_DEBUG NAMES streamsd) + FIND_LIBRARY(STREAMS_LIBRARY_RELEASE NAMES streams) + + if(STREAMS_LIBRARY_DEBUG AND STREAMS_LIBRARY_RELEASE) + set(STREAMS_LIBRARY optimized ${STREAMS_LIBRARY_RELEASE} + debug ${STREAMS_LIBRARY_DEBUG}) + else(STREAMS_LIBRARY_DEBUG AND STREAMS_LIBRARY_RELEASE) + if(STREAMS_LIBRARY_DEBUG) + set(STREAMS_LIBRARY ${STREAMS_LIBRARY_DEBUG}) + else(STREAMS_LIBRARY_DEBUG) + if(STREAMS_LIBRARY_RELEASE) + set(STREAMS_LIBRARY ${STREAMS_LIBRARY_RELEASE}) + endif(STREAMS_LIBRARY_RELEASE) + endif(STREAMS_LIBRARY_DEBUG) + endif(STREAMS_LIBRARY_DEBUG AND STREAMS_LIBRARY_RELEASE) + +else(MSVC) + find_library(STRIGI_STREAMANALYZER_LIBRARY NAMES streamanalyzer + PATHS + $ENV{STRIGI_HOME}/lib + ${CMAKE_INSTALL_PREFIX}/lib + ${_program_FILES_DIR}/strigi/lib + ) + + find_library(STRIGI_STREAMS_LIBRARY NAMES streams + PATHS + $ENV{STRIGI_HOME}/lib + ${CMAKE_INSTALL_PREFIX}/lib + ${_program_FILES_DIR}/strigi/lib + ) +endif(MSVC) if (NOT WIN32 AND NOT HAVE_STRIGI_VERSION) include(UsePkgConfig) |