diff options
Diffstat (limited to 'modules/FindKDEWIN32.cmake')
-rw-r--r-- | modules/FindKDEWIN32.cmake | 18 |
1 files changed, 10 insertions, 8 deletions
diff --git a/modules/FindKDEWIN32.cmake b/modules/FindKDEWIN32.cmake index 589b1531..d22a85a7 100644 --- a/modules/FindKDEWIN32.cmake +++ b/modules/FindKDEWIN32.cmake @@ -7,15 +7,13 @@ # KDEWIN32_LIBRARIES - The libraries needed to use KDEWIN32 # Copyright (c) 2006, Alexander Neundorf, <neundorf@kde.org> -# Copyright (c) 2007, Ralf Habacker, <ralf.habacker@freenet.de> +# Copyright (c) 2007-2008, Ralf Habacker, <ralf.habacker@freenet.de> # # Redistribution and use is allowed according to the terms of the BSD license. # For details see the accompanying COPYING-CMAKE-SCRIPTS file. if (WIN32) - include(FindLibraryWithDebug) - if (NOT KDEWIN32_DIR) if(NOT KDEWIN_FOUND) find_package(KDEWIN) @@ -28,17 +26,21 @@ 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 NO_SYSTEM_ENVIRONMENT_PATH ) - # 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) set(KDEWIN32_FOUND TRUE) # add needed system libs |