diff options
| author | Christian Ehrlicher <ch.ehrlicher@gmx.de> | 2007-09-24 10:53:59 +0000 | 
|---|---|---|
| committer | Christian Ehrlicher <ch.ehrlicher@gmx.de> | 2007-09-24 10:53:59 +0000 | 
| commit | 0e93aecc9d6e8736fa9b2bf0b9a8c6adc30e6337 (patch) | |
| tree | 29b6d12bd7c97ba9a9e60bc6758a143f7d9bb416 /modules | |
| parent | f835d46e735a731e38cfcfa39a91a97851123ad6 (diff) | |
| download | extra-cmake-modules-0e93aecc9d6e8736fa9b2bf0b9a8c6adc30e6337.tar.gz extra-cmake-modules-0e93aecc9d6e8736fa9b2bf0b9a8c6adc30e6337.tar.bz2 | |
switch to new macro FIND_LIBRARY_EX() to avoid code duplication
svn path=/trunk/KDE/kdelibs/; revision=716254
Diffstat (limited to 'modules')
| -rw-r--r-- | modules/FindBlitz.cmake | 35 | ||||
| -rw-r--r-- | modules/FindKDEWIN32.cmake | 43 | ||||
| -rw-r--r-- | modules/FindOpenSSL.cmake | 170 | ||||
| -rw-r--r-- | modules/FindQCA2.cmake | 20 | ||||
| -rw-r--r-- | modules/FindSoprano.cmake | 45 | ||||
| -rw-r--r-- | modules/FindStrigi.cmake | 64 | ||||
| -rw-r--r-- | modules/FindTaglib.cmake | 14 | 
7 files changed, 114 insertions, 277 deletions
| diff --git a/modules/FindBlitz.cmake b/modules/FindBlitz.cmake index ae337d95..cd5f3e98 100644 --- a/modules/FindBlitz.cmake +++ b/modules/FindBlitz.cmake @@ -10,6 +10,8 @@  # Redistribution and use is allowed according to the terms of the BSD license.  # For details see the accompanying COPYING-CMAKE-SCRIPTS file. +include(FindLibraryEx) +  if (BLITZ_INCLUDES AND BLITZ_LIBRARIES)    set(Blitz_FIND_QUIETLY TRUE)  endif (BLITZ_INCLUDES AND BLITZ_LIBRARIES) @@ -23,32 +25,15 @@ find_path(BLITZ_INCLUDES    ${KDE4_INCLUDE_DIR}    ${INCLUDE_INSTALL_DIR}  ) -if(MSVC) -  FIND_LIBRARY(BLITZ_LIBRARIES_DEBUG NAMES qimageblitzd) -  FIND_LIBRARY(BLITZ_LIBRARIES_RELEASE NAMES qimageblitz) -  if(BLITZ_LIBRARIES_DEBUG AND BLITZ_LIBRARIES_RELEASE) -    set(BLITZ_LIBRARIES optimized ${BLITZ_LIBRARIES_RELEASE} -                        debug ${BLITZ_LIBRARIES_DEBUG}) -  else(BLITZ_LIBRARIES_DEBUG AND BLITZ_LIBRARIES_RELEASE) -    if(BLITZ_LIBRARIES_DEBUG) -      set(BLITZ_LIBRARIES ${BLITZ_LIBRARIES_DEBUG}) -    else(BLITZ_LIBRARIES_DEBUG) -      if(BLITZ_LIBRARIES_RELEASE) -        set(BLITZ_LIBRARIES ${BLITZ_LIBRARIES_RELEASE}) -      endif(BLITZ_LIBRARIES_RELEASE) -    endif(BLITZ_LIBRARIES_DEBUG) -  endif(BLITZ_LIBRARIES_DEBUG AND BLITZ_LIBRARIES_RELEASE) -else(MSVC) -  FIND_LIBRARY(BLITZ_LIBRARIES -  NAMES -   qimageblitz -   PATHS -   $ENV{QIMAGEBLITZDIR}/lib -   ${KDE4_LIB_DIR} -   ${LIB_INSTALL_DIR} -  ) -endif(MSVC) +FIND_LIBRARY_EX(BLITZ_LIBRARIES +  WIN32_DEBUG_POSTFIX d +  qimageblitz +  PATHS +  $ENV{QIMAGEBLITZDIR}/lib +  ${KDE4_LIB_DIR} +  ${LIB_INSTALL_DIR} +)  include(FindPackageHandleStandardArgs)  find_package_handle_standard_args(Blitz DEFAULT_MSG  diff --git a/modules/FindKDEWIN32.cmake b/modules/FindKDEWIN32.cmake index 68a2f68a..de3f25d6 100644 --- a/modules/FindKDEWIN32.cmake +++ b/modules/FindKDEWIN32.cmake @@ -14,6 +14,8 @@  if (WIN32) +  include(FindLibraryEx) +    if (NOT KDEWIN32_DIR)      if(NOT KDEWIN_FOUND)        find_package(KDEWIN REQUIRED) @@ -26,50 +28,15 @@ if (WIN32)      # search for kdewin32 in the default install directory for applications (default of (n)make install) -    find_library(KDEWIN32_LIBRARY_DEBUG NAMES kdewin32d +    find_library_ex(KDEWIN32_LIBRARY +      WIN32_DEBUG_POSTFIX d +      NAMES kdewin32        PATHS           ${CMAKE_LIBRARY_PATH}          ${CMAKE_INSTALL_PREFIX}/lib        NO_SYSTEM_ENVIRONMENT_PATH      ) -    find_library(KDEWIN32_LIBRARY_RELEASE NAMES kdewin32 -      PATHS  -        ${CMAKE_LIBRARY_PATH} -        ${CMAKE_INSTALL_PREFIX}/lib -      NO_SYSTEM_ENVIRONMENT_PATH -    ) -     -    # msvc makes a difference between debug and release -    if(MSVC) -      find_library(KDEWIN32_LIBRARY_DEBUG NAMES kdewin32d -        PATHS  -          ${CMAKE_LIBRARY_PATH} -          ${CMAKE_INSTALL_PREFIX}/lib -        NO_SYSTEM_ENVIRONMENT_PATH -      ) -      if(MSVC_IDE) -        # the ide needs the debug and release version -        if( NOT KDEWIN32_LIBRARY_DEBUG OR NOT KDEWIN32_LIBRARY_RELEASE) -          message(FATAL_ERROR "\nCould NOT find the debug AND release version of the KDEWIN32 library.\nYou need to have both to use MSVC projects.\nPlease build and install both kdelibs/win/ libraries first.\n") -        endif( NOT KDEWIN32_LIBRARY_DEBUG OR NOT KDEWIN32_LIBRARY_RELEASE) -        SET(KDEWIN32_LIBRARY optimized ${KDEWIN32_LIBRARY_RELEASE} debug ${KDEWIN32_LIBRARY_DEBUG}) -      else(MSVC_IDE) -        string(TOLOWER ${CMAKE_BUILD_TYPE} CMAKE_BUILD_TYPE_TOLOWER) -        if(CMAKE_BUILD_TYPE_TOLOWER MATCHES debug) -          set(KDEWIN32_LIBRARY ${KDEWIN32_LIBRARY_DEBUG}) -        else(CMAKE_BUILD_TYPE_TOLOWER MATCHES debug) -          set(KDEWIN32_LIBRARY ${KDEWIN32_LIBRARY_RELEASE}) -        endif(CMAKE_BUILD_TYPE_TOLOWER MATCHES debug) -      endif(MSVC_IDE)  -    else(MSVC) -      if(KDEWIN32_LIBRARY_RELEASE) -  	  set(KDEWIN32_LIBRARY ${KDEWIN32_LIBRARY_RELEASE}) -  	else(KDEWIN32_LIBRARY_RELEASE) -  	  set(KDEWIN32_LIBRARY ${KDEWIN32_LIBRARY_DEBUG}) -  	endif(KDEWIN32_LIBRARY_RELEASE) -    endif(MSVC) -        # kdelibs/win/ has to be built before the rest of kdelibs/      # eventually it will be moved out from kdelibs/      if (KDEWIN32_LIBRARY AND KDEWIN32_INCLUDE_DIR) diff --git a/modules/FindOpenSSL.cmake b/modules/FindOpenSSL.cmake index 4c2a3f7d..44cfa50f 100644 --- a/modules/FindOpenSSL.cmake +++ b/modules/FindOpenSSL.cmake @@ -1,108 +1,62 @@ -# - Try to find the OpenSSL encryption library
 -# Once done this will define
 -#
 -#  OPENSSL_FOUND - system has the OpenSSL library
 -#  OPENSSL_INCLUDE_DIR - the OpenSSL include directory
 -#  OPENSSL_LIBRARIES - The libraries needed to use OpenSSL
 -#  OPENSSL_EAY_LIBRARIES - The additional libraries needed to use OpenSSL on windows
 -# Copyright (c) 2006, Alexander Neundorf, <neundorf@kde.org>
 -#
 -# Redistribution and use is allowed according to the terms of the BSD license.
 -# For details see the accompanying COPYING-CMAKE-SCRIPTS file.
 -
 -# on win32 we additional need to link to libeay32.lib
 -MACRO(OPENSSL_ADD_LIB_EAY_LIBS)
 -   IF(MSVC)
 -      # /MD and /MDd are the standard values - if somone wants to use
 -      # others, the libnames have to change here too
 -      # use also eay and libeay32 in debug as fallback for openssl < 0.9.8b
 -
 -      FIND_LIBRARY(LIB_EAY_DEBUG NAMES libeay32MDd eay libeay libeay32)
 -      FIND_LIBRARY(LIB_EAY_RELEASE NAMES libeay32MD eay libeay libeay32)
 -
 -      IF(MSVC_IDE)
 -         IF(LIB_EAY_DEBUG AND LIB_EAY_RELEASE)
 -            SET(OPENSSL_EAY_LIBRARIES optimized ${LIB_EAY_RELEASE} debug ${LIB_EAY_DEBUG})
 -         ELSE(LIB_EAY_DEBUG AND LIB_EAY_RELEASE)
 -            MESSAGE(FATAL_ERROR "Could not find the debug and release version of openssl (libeay)")
 -         ENDIF(LIB_EAY_DEBUG AND LIB_EAY_RELEASE)
 -      ELSE(MSVC_IDE)
 -         STRING(TOLOWER ${CMAKE_BUILD_TYPE} CMAKE_BUILD_TYPE_TOLOWER)
 -         IF(CMAKE_BUILD_TYPE_TOLOWER MATCHES debug)
 -            SET(OPENSSL_EAY_LIBRARIES ${LIB_EAY_DEBUG})
 -         ELSE(CMAKE_BUILD_TYPE_TOLOWER MATCHES debug)
 -            SET(OPENSSL_EAY_LIBRARIES ${LIB_EAY_RELEASE})
 -         ENDIF(CMAKE_BUILD_TYPE_TOLOWER MATCHES debug)
 -      ENDIF(MSVC_IDE)
 -      MARK_AS_ADVANCED(LIB_EAY_DEBUG LIB_EAY_RELEASE)
 -   ELSE(MSVC)
 -       FIND_LIBRARY(OPENSSL_EAY_LIBRARIES NAMES eay libeay libeay32 )
 -   ENDIF(MSVC)
 -ENDMACRO(OPENSSL_ADD_LIB_EAY_LIBS)
 -
 -IF(OPENSSL_LIBRARIES)
 -   SET(OpenSSL_FIND_QUIETLY TRUE)
 -ENDIF(OPENSSL_LIBRARIES)
 -
 -IF(SSL_EAY_DEBUG AND SSL_EAY_RELEASE)
 -   SET(LIB_FOUND 1)
 -ENDIF(SSL_EAY_DEBUG AND SSL_EAY_RELEASE)
 -
 -FIND_PATH(OPENSSL_INCLUDE_DIR openssl/ssl.h )
 -
 -IF(WIN32 AND MSVC)
 -   # /MD and /MDd are the standard values - if somone wants to use
 -   # others, the libnames have to change here too
 -   # use also ssl and ssleay32 in debug as fallback for openssl < 0.9.8b
 -
 -   FIND_LIBRARY(SSL_EAY_DEBUG NAMES ssleay32MDd ssl ssleay32)
 -   FIND_LIBRARY(SSL_EAY_RELEASE NAMES ssleay32MD ssl ssleay32)
 -
 -   IF(MSVC_IDE)
 -      IF(SSL_EAY_DEBUG AND SSL_EAY_RELEASE)
 -         SET(OPENSSL_LIBRARIES optimized ${SSL_EAY_RELEASE} debug ${SSL_EAY_DEBUG})
 -      ELSE(SSL_EAY_DEBUG AND SSL_EAY_RELEASE)
 -         MESSAGE(FATAL_ERROR "Could not find the debug and release version of openssl")
 -      ENDIF(SSL_EAY_DEBUG AND SSL_EAY_RELEASE)
 -   ELSE(MSVC_IDE)
 -      STRING(TOLOWER ${CMAKE_BUILD_TYPE} CMAKE_BUILD_TYPE_TOLOWER)
 -      IF(CMAKE_BUILD_TYPE_TOLOWER MATCHES debug)
 -         SET(OPENSSL_LIBRARIES ${SSL_EAY_DEBUG})
 -      ELSE(CMAKE_BUILD_TYPE_TOLOWER MATCHES debug)
 -         SET(OPENSSL_LIBRARIES ${SSL_EAY_RELEASE})
 -      ENDIF(CMAKE_BUILD_TYPE_TOLOWER MATCHES debug)
 -   ENDIF(MSVC_IDE)
 -   MARK_AS_ADVANCED(SSL_EAY_DEBUG SSL_EAY_RELEASE)
 -ELSE(WIN32 AND MSVC)
 -
 -   FIND_LIBRARY(OPENSSL_LIBRARIES NAMES ssl ssleay32 ssleay32MD )
 -
 -ENDIF(WIN32 AND MSVC)
 -
 -IF(WIN32)
 -   OPENSSL_ADD_LIB_EAY_LIBS()
 -   IF(OPENSSL_INCLUDE_DIR AND OPENSSL_LIBRARIES AND OPENSSL_EAY_LIBRARIES)
 -      SET(OPENSSL_FOUND TRUE)
 -   ELSE(OPENSSL_INCLUDE_DIR AND OPENSSL_LIBRARIES AND OPENSSL_EAY_LIBRARIES)
 -      SET(OPENSSL_FOUND FALSE)
 -   ENDIF (OPENSSL_INCLUDE_DIR AND OPENSSL_LIBRARIES AND OPENSSL_EAY_LIBRARIES)
 -ELSE(WIN32)
 -   IF(OPENSSL_INCLUDE_DIR AND OPENSSL_LIBRARIES)
 -      SET(OPENSSL_FOUND TRUE)
 -   ELSE(OPENSSL_INCLUDE_DIR AND OPENSSL_LIBRARIES)
 -      SET(OPENSSL_FOUND FALSE)
 -   ENDIF (OPENSSL_INCLUDE_DIR AND OPENSSL_LIBRARIES)
 -ENDIF(WIN32)
 -
 -IF (OPENSSL_FOUND)
 -   IF (NOT OpenSSL_FIND_QUIETLY)
 -      MESSAGE(STATUS "Found OpenSSL: ${OPENSSL_LIBRARIES}")
 -   ENDIF (NOT OpenSSL_FIND_QUIETLY)
 -ELSE (OPENSSL_FOUND)
 -   IF (OpenSSL_FIND_REQUIRED)
 -      MESSAGE(FATAL_ERROR "Could NOT find OpenSSL")
 -   ENDIF (OpenSSL_FIND_REQUIRED)
 -ENDIF (OPENSSL_FOUND)
 -
 -MARK_AS_ADVANCED(OPENSSL_INCLUDE_DIR OPENSSL_LIBRARIES)
 -
 +# - Try to find the OpenSSL encryption library +# Once done this will define +# +#  OPENSSL_FOUND - system has the OpenSSL library +#  OPENSSL_INCLUDE_DIR - the OpenSSL include directory +#  OPENSSL_LIBRARIES - The libraries needed to use OpenSSL +#  OPENSSL_EAY_LIBRARIES - The additional libraries needed to use OpenSSL on windows +# Copyright (c) 2006, Alexander Neundorf, <neundorf@kde.org> +# +# Redistribution and use is allowed according to the terms of the BSD license. +# For details see the accompanying COPYING-CMAKE-SCRIPTS file. + +include(FindLibraryEx) + +# on win32 we additional need to link to libeay32.lib +MACRO(OPENSSL_ADD_LIB_EAY_LIBS) +   FIND_LIBRARY_EX(OPENSSL_EAY_LIBRARIES +                   WIN32_DEBUG_POSTFIX d +                   NAMES eay libeay libeay32 libeay32MD) +ENDMACRO(OPENSSL_ADD_LIB_EAY_LIBS) + +IF(OPENSSL_LIBRARIES) +   SET(OpenSSL_FIND_QUIETLY TRUE) +ENDIF(OPENSSL_LIBRARIES) + +IF(SSL_EAY_DEBUG AND SSL_EAY_RELEASE) +   SET(LIB_FOUND 1) +ENDIF(SSL_EAY_DEBUG AND SSL_EAY_RELEASE) + +FIND_PATH(OPENSSL_INCLUDE_DIR openssl/ssl.h ) + +FIND_LIBRARY_EX(OPENSSL_LIBRARIES +                WIN32_DEBUG_POSTFIX d +                NAMES ssl ssleay ssleay32 ssleay32MD) + +IF(WIN32) +   OPENSSL_ADD_LIB_EAY_LIBS() +   IF(OPENSSL_INCLUDE_DIR AND OPENSSL_LIBRARIES AND OPENSSL_EAY_LIBRARIES) +      SET(OPENSSL_FOUND TRUE) +   ELSE(OPENSSL_INCLUDE_DIR AND OPENSSL_LIBRARIES AND OPENSSL_EAY_LIBRARIES) +      SET(OPENSSL_FOUND FALSE) +   ENDIF (OPENSSL_INCLUDE_DIR AND OPENSSL_LIBRARIES AND OPENSSL_EAY_LIBRARIES) +ELSE(WIN32) +   IF(OPENSSL_INCLUDE_DIR AND OPENSSL_LIBRARIES) +      SET(OPENSSL_FOUND TRUE) +   ELSE(OPENSSL_INCLUDE_DIR AND OPENSSL_LIBRARIES) +      SET(OPENSSL_FOUND FALSE) +   ENDIF (OPENSSL_INCLUDE_DIR AND OPENSSL_LIBRARIES) +ENDIF(WIN32) + +IF (OPENSSL_FOUND) +   IF (NOT OpenSSL_FIND_QUIETLY) +      MESSAGE(STATUS "Found OpenSSL: ${OPENSSL_LIBRARIES}") +   ENDIF (NOT OpenSSL_FIND_QUIETLY) +ELSE (OPENSSL_FOUND) +   IF (OpenSSL_FIND_REQUIRED) +      MESSAGE(FATAL_ERROR "Could NOT find OpenSSL") +   ENDIF (OpenSSL_FIND_REQUIRED) +ENDIF (OPENSSL_FOUND) + +MARK_AS_ADVANCED(OPENSSL_INCLUDE_DIR OPENSSL_LIBRARIES) + diff --git a/modules/FindQCA2.cmake b/modules/FindQCA2.cmake index d8b74733..2f4835bf 100644 --- a/modules/FindQCA2.cmake +++ b/modules/FindQCA2.cmake @@ -14,6 +14,8 @@  # Redistribution and use is allowed according to the terms of the BSD license.  # For details see the accompanying COPYING-CMAKE-SCRIPTS file. +include(FindLibraryEx) +  if (QCA2_INCLUDE_DIR AND QCA2_LIBRARIES)    # in cache already @@ -34,21 +36,9 @@ else (QCA2_INCLUDE_DIR AND QCA2_LIBRARIES)        NO_DEFAULT_PATH      )    ELSE (NOT WIN32) -    FIND_LIBRARY(QCA2_LIBRARIES_DEBUG NAMES qcad) -    FIND_LIBRARY(QCA2_LIBRARIES_RELEASE NAMES qca) - -    if(QCA2_LIBRARIES_DEBUG AND QCA2_LIBRARIES_RELEASE) -      set(QCA2_LIBRARIES optimized ${QCA2_LIBRARIES_RELEASE} -                          debug ${QCA2_LIBRARIES_DEBUG}) -    else(QCA2_LIBRARIES_DEBUG AND QCA2_LIBRARIES_RELEASE) -      if(QCA2_LIBRARIES_DEBUG) -        set(QCA2_LIBRARIES ${QCA2_LIBRARIES_DEBUG}) -      else(QCA2_LIBRARIES_DEBUG) -        if(QCA2_LIBRARIES_RELEASE) -          set(QCA2_LIBRARIES ${QCA2_LIBRARIES_RELEASE}) -        endif(QCA2_LIBRARIES_RELEASE) -      endif(QCA2_LIBRARIES_DEBUG) -    endif(QCA2_LIBRARIES_DEBUG AND QCA2_LIBRARIES_RELEASE) +    FIND_LIBRARY_EX(QCA2_LIBRARIES +                    WIN32_DEBUG_POSTFIX d +                    NAMES qca)      FIND_PATH(QCA2_INCLUDE_DIR QtCrypto/qca.h)      IF(QCA2_INCLUDE_DIR) diff --git a/modules/FindSoprano.cmake b/modules/FindSoprano.cmake index 30491fca..18c0893e 100644 --- a/modules/FindSoprano.cmake +++ b/modules/FindSoprano.cmake @@ -15,44 +15,13 @@ else(SOPRANO_INCLUDE_DIR AND SOPRANO_LIBRARIES)      ${INCLUDE_INSTALL_DIR}      ) -  if(MSVC) -    FIND_LIBRARY(SOPRANO_LIBRARIES_DEBUG -      NAMES -      sopranod -      PATHS -      ${KDE4_LIB_DIR} -      ${LIB_INSTALL_DIR} -    ) -    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(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} -      ) -  endif(MSVC) +  FIND_LIBRARY_EX(SOPRANO_LIBRARIES +    WIN32_DEBUG_POSTFIX d +    NAMES soprano +    PATHS +    ${KDE4_LIB_DIR} +    ${LIB_INSTALL_DIR} +  )    if(SOPRANO_INCLUDE_DIR AND SOPRANO_LIBRARIES)      set(Soprano_FOUND TRUE) 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) diff --git a/modules/FindTaglib.cmake b/modules/FindTaglib.cmake index 1602fe1d..7b5ffc39 100644 --- a/modules/FindTaglib.cmake +++ b/modules/FindTaglib.cmake @@ -10,6 +10,8 @@  # Redistribution and use is allowed according to the terms of the BSD license.  # For details see the accompanying COPYING-CMAKE-SCRIPTS file. +include(FindLibraryEx) +  IF(NOT WIN32)      FIND_PROGRAM(TAGLIBCONFIG_EXECUTABLE NAMES taglib-config PATHS         /usr/bin @@ -44,12 +46,12 @@ ELSE(TAGLIBCONFIG_EXECUTABLE)      ${INCLUDE_INSTALL_DIR}    ) -  FIND_LIBRARY(TAGLIB_LIBRARIES -  NAMES -   tag -   PATHS -   ${KDE4_LIB_DIR} -   ${LIB_INSTALL_DIR} +  FIND_LIBRARY_EX(TAGLIB_LIBRARIES +    WIN32_DEBUG_POSTFIX d +    NAMES tag +    PATHS +    ${KDE4_LIB_DIR} +    ${LIB_INSTALL_DIR}    )    INCLUDE(FindPackageHandleStandardArgs) | 
