From feebc3c9de4b839403de3c96d86822eeaf6d4182 Mon Sep 17 00:00:00 2001 From: Ralf Habacker Date: Fri, 8 Aug 2008 20:50:36 +0000 Subject: 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 --- modules/FindKDEWIN32.cmake | 14 +++++++++----- 1 file 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 -- cgit v1.2.1