diff options
| author | Ralf Habacker <ralf.habacker@freenet.de> | 2008-08-08 20:50:36 +0000 | 
|---|---|---|
| committer | Ralf Habacker <ralf.habacker@freenet.de> | 2008-08-08 20:50:36 +0000 | 
| commit | feebc3c9de4b839403de3c96d86822eeaf6d4182 (patch) | |
| tree | e4b7bc6dda67a922f49ee01e1df7f47de78dd789 | |
| parent | f52bf584332ce5904ed5f6b2c8a4a00cec695b01 (diff) | |
| download | extra-cmake-modules-feebc3c9de4b839403de3c96d86822eeaf6d4182.tar.gz extra-cmake-modules-feebc3c9de4b839403de3c96d86822eeaf6d4182.tar.bz2 | |
limit KDEWIN_LIBRARIES to the library identified by the recent cmake build type - the new link interface of cmake 2.6.x does not support the optimized/debug library prefixes, using them results for example into kde4-config link error not finding 'optimized' library. 
svn path=/trunk/KDE/kdelibs/; revision=844126
| -rw-r--r-- | modules/FindKDEWIN32.cmake | 14 | 
1 files changed, 9 insertions, 5 deletions
| diff --git a/modules/FindKDEWIN32.cmake b/modules/FindKDEWIN32.cmake index 589b1531..79c66dc6 100644 --- a/modules/FindKDEWIN32.cmake +++ b/modules/FindKDEWIN32.cmake @@ -14,8 +14,6 @@  if (WIN32) -  include(FindLibraryWithDebug) -    if (NOT KDEWIN32_DIR)      if(NOT KDEWIN_FOUND)        find_package(KDEWIN) @@ -28,9 +26,15 @@ if (WIN32)      # search for kdewin32 in the default install directory for applications (default of (n)make install)      FILE(TO_CMAKE_PATH "${CMAKE_LIBRARY_PATH}" _cmakeLibraryPathCmakeStyle) -    find_library_with_debug(KDEWIN32_LIBRARY -      WIN32_DEBUG_POSTFIX d -      NAMES kdewin32 + +    if (CMAKE_BUILD_TYPE STREQUAL "Debug") +        set (LIBRARY_NAME kdewin32d) +    else (CMAKE_BUILD_TYPE STREQUAL "Debug") +        set (LIBRARY_NAME kdewin32) +    endif (CMAKE_BUILD_TYPE STREQUAL "Debug") + +    find_library(KDEWIN32_LIBRARY +      NAMES ${LIBRARY_NAME}        PATHS           ${_cmakeLibraryPathCmakeStyle}          ${CMAKE_INSTALL_PREFIX}/lib | 
