aboutsummaryrefslogtreecommitdiff
path: root/modules/FindKDEWIN32.cmake
diff options
context:
space:
mode:
Diffstat (limited to 'modules/FindKDEWIN32.cmake')
-rw-r--r--modules/FindKDEWIN32.cmake18
1 files changed, 8 insertions, 10 deletions
diff --git a/modules/FindKDEWIN32.cmake b/modules/FindKDEWIN32.cmake
index d22a85a7..589b1531 100644
--- a/modules/FindKDEWIN32.cmake
+++ b/modules/FindKDEWIN32.cmake
@@ -7,13 +7,15 @@
# KDEWIN32_LIBRARIES - The libraries needed to use KDEWIN32
# Copyright (c) 2006, Alexander Neundorf, <neundorf@kde.org>
-# Copyright (c) 2007-2008, Ralf Habacker, <ralf.habacker@freenet.de>
+# Copyright (c) 2007, 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)
@@ -26,21 +28,17 @@ 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)
-
- 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}
+ find_library_with_debug(KDEWIN32_LIBRARY
+ WIN32_DEBUG_POSTFIX d
+ NAMES kdewin32
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