diff options
Diffstat (limited to 'modules/FindStrigi.cmake')
-rw-r--r-- | modules/FindStrigi.cmake | 64 |
1 files changed, 17 insertions, 47 deletions
diff --git a/modules/FindStrigi.cmake b/modules/FindStrigi.cmake index a9f854db..462c9869 100644 --- a/modules/FindStrigi.cmake +++ b/modules/FindStrigi.cmake @@ -6,6 +6,7 @@ # STRIGI_STREAMANALYZER_LIBRARY - Link these to use Strigi streamanalyzer # STRIGI_STREAMS_LIBRARY - Link these to use Strigi streams +include(FindLibraryEx) set(STRIGI_MIN_VERSION "0.5.3") @@ -20,54 +21,23 @@ find_path(STRIGI_INCLUDE_DIR strigi/streamanalyzer.h ${_program_FILES_DIR}/strigi/include ) -if(MSVC) - FIND_LIBRARY(STREAMANALYZER_LIBRARY_DEBUG NAMES streamanalyzerd) - FIND_LIBRARY(STREAMANALYZER_LIBRARY_RELEASE NAMES streamanalyzer) - - if(STREAMANALYZER_LIBRARY_DEBUG AND STREAMANALYZER_LIBRARY_RELEASE) - set(STRIGI_STREAMANALYZER_LIBRARY optimized ${STREAMANALYZER_LIBRARY_RELEASE} - debug ${STREAMANALYZER_LIBRARY_DEBUG}) - else(STREAMANALYZER_LIBRARY_DEBUG AND STREAMANALYZER_LIBRARY_RELEASE) - if(STREAMANALYZER_LIBRARY_DEBUG) - set(STRIGI_STREAMANALYZER_LIBRARY ${STREAMANALYZER_LIBRARY_DEBUG}) - else(STREAMANALYZER_LIBRARY_DEBUG) - if(STREAMANALYZER_LIBRARY_RELEASE) - set(STRIGI_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(STRIGI_STREAMS_LIBRARY optimized ${STREAMS_LIBRARY_RELEASE} - debug ${STREAMS_LIBRARY_DEBUG}) - else(STREAMS_LIBRARY_DEBUG AND STREAMS_LIBRARY_RELEASE) - if(STREAMS_LIBRARY_DEBUG) - set(STRIGI_STREAMS_LIBRARY ${STREAMS_LIBRARY_DEBUG}) - else(STREAMS_LIBRARY_DEBUG) - if(STREAMS_LIBRARY_RELEASE) - set(STRIGI_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_ex(STRIGI_STREAMANALYZER_LIBRARY + WIN32_DEBUG_POSTFIX d + 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) +find_library_ex(STRIGI_STREAMS_LIBRARY + WIN32_DEBUG_POSTFIX d + NAMES streams + PATHS + $ENV{STRIGI_HOME}/lib + ${CMAKE_INSTALL_PREFIX}/lib + ${_program_FILES_DIR}/strigi/lib +) if (NOT WIN32 AND NOT HAVE_STRIGI_VERSION) include(UsePkgConfig) |