aboutsummaryrefslogtreecommitdiff
path: root/modules
diff options
context:
space:
mode:
authorRalf Habacker <ralf.habacker@freenet.de>2009-06-16 06:43:45 +0000
committerRalf Habacker <ralf.habacker@freenet.de>2009-06-16 06:43:45 +0000
commit6962f4ad4ba904ce99398af174de6fbb06bb9be9 (patch)
treeb6d16f1ffe5f28c9a1bf46118d0cabf2e6e8a8e6 /modules
parent98b828d70a0d23c5de29b30854685a9252b7762d (diff)
downloadextra-cmake-modules-6962f4ad4ba904ce99398af174de6fbb06bb9be9.tar.gz
extra-cmake-modules-6962f4ad4ba904ce99398af174de6fbb06bb9be9.tar.bz2
renamed kdewin32 to kdewin to have a more generic name, approved by kde-buildsystem list
svn path=/trunk/KDE/kdelibs/; revision=982530
Diffstat (limited to 'modules')
-rw-r--r--modules/FindKDE4Internal.cmake10
-rw-r--r--modules/FindKDEWIN.cmake73
-rw-r--r--modules/FindKDEWIN32.cmake67
3 files changed, 88 insertions, 62 deletions
diff --git a/modules/FindKDE4Internal.cmake b/modules/FindKDE4Internal.cmake
index a99ddd14..397a0d79 100644
--- a/modules/FindKDE4Internal.cmake
+++ b/modules/FindKDE4Internal.cmake
@@ -583,11 +583,11 @@ endif(${CMAKE_MAJOR_VERSION}.${CMAKE_MINOR_VERSION}.${CMAKE_PATCH_VERSION} VERSI
option(KDE4_ENABLE_FPIE "Enable platform supports PIE linking")
if (WIN32)
- find_package(KDEWIN32 REQUIRED)
+ find_package(KDEWIN REQUIRED)
OPTION(KDE4_ENABLE_UAC_MANIFEST "add manifest to make vista uac happy" OFF)
if (KDE4_ENABLE_UAC_MANIFEST)
find_program(KDE4_MT_EXECUTABLE mt
- PATHS ${KDEWIN32_INCLUDE_DIR}/../bin
+ PATHS ${KDEWIN_INCLUDE_DIR}/../bin
NO_DEFAULT_PATH
)
if (KDE4_MT_EXECUTABLE)
@@ -822,12 +822,12 @@ if (WIN32)
addExplorerWrapper("kdelibs")
endif(_kdeBootStrapping)
- set( _KDE4_PLATFORM_INCLUDE_DIRS ${KDEWIN32_INCLUDES})
+ set( _KDE4_PLATFORM_INCLUDE_DIRS ${KDEWIN_INCLUDES})
- # if we are compiling kdelibs, add KDEWIN32_LIBRARIES explicitely,
+ # if we are compiling kdelibs, add KDEWIN_LIBRARIES explicitely,
# otherwise they come from KDELibsDependencies.cmake, Alex
if (_kdeBootStrapping)
- set( KDE4_KDECORE_LIBS ${KDE4_KDECORE_LIBS} ${KDEWIN32_LIBRARIES} )
+ set( KDE4_KDECORE_LIBS ${KDE4_KDECORE_LIBS} ${KDEWIN_LIBRARIES} )
endif (_kdeBootStrapping)
# we prefer to use a different postfix for debug libs only on Windows
diff --git a/modules/FindKDEWIN.cmake b/modules/FindKDEWIN.cmake
new file mode 100644
index 00000000..354ecb91
--- /dev/null
+++ b/modules/FindKDEWIN.cmake
@@ -0,0 +1,73 @@
+# - Try to find the KDEWIN library
+#
+# Once done this will define
+#
+# KDEWIN_FOUND - system has KDEWIN
+# KDEWIN_INCLUDES - the KDEWIN include directories
+# KDEWIN_LIBRARIES - The libraries needed to use KDEWIN
+
+# Copyright (c) 2006, Alexander Neundorf, <neundorf@kde.org>
+# Copyright (c) 2007-2009, 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)
+ if (NOT KDEWIN_LIBRARIES)
+
+ find_path(KDEWIN_INCLUDE_DIR kdewin_export.h
+ ${CMAKE_INCLUDE_PATH}
+ ${CMAKE_INSTALL_PREFIX}/include
+ )
+
+ # search for kdewin 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 kdewind)
+ else (CMAKE_BUILD_TYPE STREQUAL "Debug")
+ set (LIBRARY_NAME kdewin)
+ endif (CMAKE_BUILD_TYPE STREQUAL "Debug")
+
+ find_library(KDEWIN_LIBRARY
+ NAMES ${LIBRARY_NAME}
+ PATHS
+ ${_cmakeLibraryPathCmakeStyle}
+ ${CMAKE_INSTALL_PREFIX}/lib
+ NO_SYSTEM_ENVIRONMENT_PATH
+ )
+
+ if (KDEWIN_LIBRARY AND KDEWIN_INCLUDE_DIR)
+ set(KDEWIN_FOUND TRUE)
+ # add needed system libs
+ set(KDEWIN_LIBRARIES ${KDEWIN_LIBRARY} user32 shell32 ws2_32 netapi32 userenv)
+
+ if (MINGW)
+ #mingw compiler
+ set(KDEWIN_INCLUDES ${KDEWIN_INCLUDE_DIR} ${KDEWIN_INCLUDE_DIR}/mingw ${QT_INCLUDES})
+ else (MINGW)
+ # msvc compiler
+ # add the MS SDK include directory if available
+ file(TO_CMAKE_PATH "$ENV{MSSDK}" MSSDK_DIR)
+ set(KDEWIN_INCLUDES ${KDEWIN_INCLUDE_DIR} ${KDEWIN_INCLUDE_DIR}/msvc ${QT_INCLUDES} ${MSSDK_DIR})
+ endif (MINGW)
+
+ endif (KDEWIN_LIBRARY AND KDEWIN_INCLUDE_DIR)
+ # required for configure
+ set(CMAKE_REQUIRED_INCLUDES ${CMAKE_REQUIRED_INCLUDES} ${KDEWIN_INCLUDES})
+ set(CMAKE_REQUIRED_LIBRARIES ${CMAKE_REQUIRED_LIBRARIES} ${KDEWIN_LIBRARIES})
+
+ endif (NOT KDEWIN_LIBRARIES)
+
+ if (KDEWIN_FOUND)
+ if (NOT KDEWIN_FIND_QUIETLY)
+ message(STATUS "Found KDEWIN library: ${KDEWIN_LIBRARY}")
+ endif (NOT KDEWIN_FIND_QUIETLY)
+
+ else (KDEWIN_FOUND)
+ if (KDEWIN_FIND_REQUIRED)
+ message(FATAL_ERROR "Could NOT find KDEWIN library\nPlease install it first")
+ endif (KDEWIN_FIND_REQUIRED)
+ endif (KDEWIN_FOUND)
+endif (WIN32)
diff --git a/modules/FindKDEWIN32.cmake b/modules/FindKDEWIN32.cmake
index 6ed0492c..1f78055b 100644
--- a/modules/FindKDEWIN32.cmake
+++ b/modules/FindKDEWIN32.cmake
@@ -1,4 +1,5 @@
# - Try to find the KDEWIN32 library
+# - Try to find the KDEWIN32 library - deprecated
#
# Once done this will define
#
@@ -7,67 +8,19 @@
# 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-2009, 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)
- if (NOT KDEWIN32_DIR)
-
- find_path(KDEWIN32_INCLUDE_DIR kdewin_export.h winposix_export.h
- ${CMAKE_INCLUDE_PATH}
- ${CMAKE_INSTALL_PREFIX}/include
- )
-
- # 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 kdewind kdewin32d)
- else (CMAKE_BUILD_TYPE STREQUAL "Debug")
- set (LIBRARY_NAME kdewin kdewin32)
- endif (CMAKE_BUILD_TYPE STREQUAL "Debug")
-
- find_library(KDEWIN32_LIBRARY
- NAMES ${LIBRARY_NAME}
- PATHS
- ${_cmakeLibraryPathCmakeStyle}
- ${CMAKE_INSTALL_PREFIX}/lib
- NO_SYSTEM_ENVIRONMENT_PATH
- )
-
- if (KDEWIN32_LIBRARY AND KDEWIN32_INCLUDE_DIR)
- set(KDEWIN32_FOUND TRUE)
- # add needed system libs
- set(KDEWIN32_LIBRARIES ${KDEWIN32_LIBRARY} user32 shell32 ws2_32 netapi32 userenv)
-
- if (MINGW)
- #mingw compiler
- set(KDEWIN32_INCLUDES ${KDEWIN32_INCLUDE_DIR} ${KDEWIN32_INCLUDE_DIR}/mingw ${QT_INCLUDES})
- else (MINGW)
- # msvc compiler
- # add the MS SDK include directory if available
- file(TO_CMAKE_PATH "$ENV{MSSDK}" MSSDK_DIR)
- set(KDEWIN32_INCLUDES ${KDEWIN32_INCLUDE_DIR} ${KDEWIN32_INCLUDE_DIR}/msvc ${QT_INCLUDES} ${MSSDK_DIR})
- endif (MINGW)
-
- endif (KDEWIN32_LIBRARY AND KDEWIN32_INCLUDE_DIR)
- # required for configure
- set(CMAKE_REQUIRED_INCLUDES ${CMAKE_REQUIRED_INCLUDES} ${KDEWIN32_INCLUDES})
- set(CMAKE_REQUIRED_LIBRARIES ${CMAKE_REQUIRED_LIBRARIES} ${KDEWIN32_LIBRARIES})
-
- endif (NOT KDEWIN32_DIR)
-
- if (KDEWIN32_FOUND)
- if (NOT KDEWIN32_FIND_QUIETLY)
- message(STATUS "Found kdewin32 library: ${KDEWIN32_LIBRARY}")
- endif (NOT KDEWIN32_FIND_QUIETLY)
-
- else (KDEWIN32_FOUND)
- if (KDEWIN32_FIND_REQUIRED)
- message(FATAL_ERROR "Could NOT find KDEWIN32 library\nPlease install it first")
- endif (KDEWIN32_FIND_REQUIRED)
- endif (KDEWIN32_FOUND)
+ message(STATUS "The kdewin32 cmake module is deprecated, use kdewin instead")
+ find_package(KDEWIN)
+
+ if (KDEWIN_FOUND)
+ set(KDEWIN32_FOUND ${KDEWIN_FOUND})
+ set(KDEWIN32_INCLUDES ${KDEWIN_INCLUDES})
+ set(KDEWIN32_LIBRARIES ${KDEWIN_LIBRARIES})
+ endif (KDEWIN_FOUND)
endif (WIN32)