diff options
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 |