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/FindBlitz.cmake | |
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/FindBlitz.cmake')
-rw-r--r-- | modules/FindBlitz.cmake | 35 |
1 files changed, 10 insertions, 25 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 |