Hi,
in recent svn there is a windows only kdewin32 package containing stuff
required by kde packages.
Because the name indicates a limitation by using the '32' in the name
there is a migration in work to rename it to a more generic name kdewin.
The required changes of this migration are currently limited to the
kdelibs cmake build system.
The patch contains the following changes:
- new file FindKDEWIN.cmake - a copy of FindKDEWIN32.cmake with global
replace of KDEWIN32 with KDEWIN
- FindKDEWIN32.cmake -> calls FindKDEWIN.cmake, defines still KDEWIN32_
... vars.
- renamed KDEWIN32_... variables to KDEWIN_.. in several CMakeLists.txt
files.
I tried to follow the cmake commit rules. If there any other problems
with this patch let me know.
Thanks
Ralf
Index: cmake/modules/FindKDE4Internal.cmake
===================================================================
--- cmake/modules/FindKDE4Internal.cmake (revision 979583)
+++ cmake/modules/FindKDE4Internal.cmake (working copy)
@@ -583,11 +583,11 @@
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 @@
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
Index: cmake/modules/FindKDEWIN.cmake
===================================================================
--- cmake/modules/FindKDEWIN.cmake (revision 0)
+++ cmake/modules/FindKDEWIN.cmake (revision 0)
@@ -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, <[email protected]>
+# Copyright (c) 2007-2009, Ralf Habacker, <[email protected]>
+#
+# 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)
Index: cmake/modules/FindKDEWIN32.cmake
===================================================================
--- cmake/modules/FindKDEWIN32.cmake (revision 979583)
+++ cmake/modules/FindKDEWIN32.cmake (working copy)
@@ -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, <[email protected]>
-# Copyright (c) 2007-2008, Ralf Habacker, <[email protected]>
+# Copyright (c) 2007-2009, Ralf Habacker, <[email protected]>
#
# 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)
+ message(STATUS "The kdewin32 cmake module is deprecated, use kdewin instead")
+ find_package(KDEWIN)
- find_path(KDEWIN32_INCLUDE_DIR 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)
+ if (KDEWIN_FOUND)
+ set(KDEWIN32_FOUND ${KDEWIN_FOUND})
+ set(KDEWIN32_INCLUDES ${KDEWIN_INCLUDES})
+ set(KDEWIN32_LIBRARIES ${KDEWIN_LIBRARIES})
+ endif (KDEWIN_FOUND)
endif (WIN32)
Index: kdecore/CMakeLists.txt
===================================================================
--- kdecore/CMakeLists.txt (revision 979579)
+++ kdecore/CMakeLists.txt (working copy)
@@ -26,7 +26,7 @@
set(kdecore_OPTIONAL_LIBS)
if(WIN32)
- set(kdecore_OPTIONAL_LIBS ${kdecore_OPTIONAL_LIBS} ${KDEWIN32_LIBRARIES})
+ set(kdecore_OPTIONAL_LIBS ${kdecore_OPTIONAL_LIBS} ${KDEWIN_LIBRARIES})
endif(WIN32)
# Needed for the kdatetime test in release mode
@@ -288,7 +288,7 @@
target_link_libraries(kdecore ${QT_QTCORE_LIBRARY} ${QT_QTNETWORK_LIBRARY}
${QT_QTDBUS_LIBRARY} ${QT_QTXML_LIBRARY} ${ZLIB_LIBRARY}
${kdecore_OPTIONAL_LIBS})
if(WIN32)
- set(kdecore_LINK_INTERFACE_LIBRARIES ${QT_QTDBUS_LIBRARY}
${QT_QTCORE_LIBRARY} ${KDEWIN32_LIBRARIES})
+ set(kdecore_LINK_INTERFACE_LIBRARIES ${QT_QTDBUS_LIBRARY}
${QT_QTCORE_LIBRARY} ${KDEWIN_LIBRARIES})
else(WIN32)
if(APPLE)
set(kdecore_LINK_INTERFACE_LIBRARIES ${QT_QTDBUS_LIBRARY}
${QT_QTCORE_LIBRARY} ${CARBON_LIBRARY})
Index: kdeui/tests/CMakeLists.txt
===================================================================
--- kdeui/tests/CMakeLists.txt (revision 979579)
+++ kdeui/tests/CMakeLists.txt (working copy)
@@ -7,13 +7,13 @@
MACRO(KDEUI_UNIT_TESTS)
FOREACH(_testname ${ARGN})
kde4_add_unit_test(${_testname} ${_testname}.cpp)
- target_link_libraries(${_testname} ${KDE4_KDEUI_LIBS}
${QT_QTTEST_LIBRARY} ${QT_QTXML_LIBRARY} ${KDEWIN32_LIBRARIES})
+ target_link_libraries(${_testname} ${KDE4_KDEUI_LIBS}
${QT_QTTEST_LIBRARY} ${QT_QTXML_LIBRARY} ${KDEWIN_LIBRARIES})
ENDFOREACH(_testname)
ENDMACRO(KDEUI_UNIT_TESTS)
MACRO(KDEUI_EXECUTABLE_TESTS)
FOREACH(_testname ${ARGN})
kde4_add_executable(${_testname} TEST ${_testname}.cpp)
- target_link_libraries(${_testname} ${KDE4_KDEUI_LIBS}
${QT_QTTEST_LIBRARY} ${QT_QTXML_LIBRARY} ${KDEWIN32_LIBRARIES})
+ target_link_libraries(${_testname} ${KDE4_KDEUI_LIBS}
${QT_QTTEST_LIBRARY} ${QT_QTXML_LIBRARY} ${KDEWIN_LIBRARIES})
ENDFOREACH(_testname)
ENDMACRO(KDEUI_EXECUTABLE_TESTS)
Index: kjs/CMakeLists.txt
===================================================================
--- kjs/CMakeLists.txt (revision 979579)
+++ kjs/CMakeLists.txt (working copy)
@@ -38,7 +38,7 @@
configure_file(global.h.cmake ${CMAKE_CURRENT_BINARY_DIR}/global.h )
configure_file(config.h.cmake ${CMAKE_CURRENT_BINARY_DIR}/config.h )
-include_directories(${KDE4_KDECORE_INCLUDES} ${CMAKE_SOURCE_DIR}/wtf
${KDEWIN32_INCLUDES} )
+include_directories(${KDE4_KDECORE_INCLUDES} ${CMAKE_SOURCE_DIR}/wtf
${KDEWIN_INCLUDES} )
macro_log_feature(PCRE_FOUND "PCRE" "Perl Compatible Regular Expression"
"www.pcre.org" FALSE "" "Lack of PCRE will result in extremely poor regular
expression support in KJS. ")
@@ -193,7 +193,7 @@
kde4_add_library(${KJSLIBNAME} SHARED ${kjs_LIB_SRCS})
if(WIN32)
- target_link_libraries(${KJSLIBNAME} ${KDEWIN32_LIBRARIES})
+ target_link_libraries(${KJSLIBNAME} ${KDEWIN_LIBRARIES})
endif(WIN32)
if(CMAKE_THREAD_LIBS_INIT)
Index: kjs/tests/CMakeLists.txt
===================================================================
--- kjs/tests/CMakeLists.txt (revision 979579)
+++ kjs/tests/CMakeLists.txt (working copy)
@@ -1,6 +1,6 @@
set( EXECUTABLE_OUTPUT_PATH ${CMAKE_CURRENT_BINARY_DIR} )
-include_directories( ${CMAKE_SOURCE_DIR}/kjs ${CMAKE_SOURCE_DIR}/wtf
${KDEWIN32_INCLUDES} ${CMAKE_CURRENT_BINARY_DIR}/.. )
+include_directories( ${CMAKE_SOURCE_DIR}/kjs ${CMAKE_SOURCE_DIR}/wtf
${KDEWIN_INCLUDES} ${CMAKE_CURRENT_BINARY_DIR}/.. )
if (NOT DEFINED QT_ONLY)
set(KJSLIBNAME kjs)
@@ -14,7 +14,7 @@
kde4_add_executable(testkjs_static TEST ${testkjs_static_SRCS})
-target_link_libraries(testkjs_static ${KJSLIBNAME} ${KDEWIN32_LIBRARIES}
${QT_QTCORE_LIBRARY})
+target_link_libraries(testkjs_static ${KJSLIBNAME} ${KDEWIN_LIBRARIES}
${QT_QTCORE_LIBRARY})
########### testkjs ###############
@@ -22,6 +22,6 @@
kde4_add_executable(testkjs TEST ${testkjs_SRCS})
-target_link_libraries(testkjs ${KJSLIBNAME} ${KDEWIN32_LIBRARIES}
${QT_QTCORE_LIBRARY})
+target_link_libraries(testkjs ${KJSLIBNAME} ${KDEWIN_LIBRARIES}
${QT_QTCORE_LIBRARY})
Index: kjsembed/qtonly/CMakeLists.txt
===================================================================
--- kjsembed/qtonly/CMakeLists.txt (revision 979579)
+++ kjsembed/qtonly/CMakeLists.txt (working copy)
@@ -123,9 +123,9 @@
endmacro(KDE4_NO_ENABLE_FINAL _project_name)
if (NOT QTONLY_WEBKIT)
- include_directories( ${CMAKE_SOURCE_DIR}/../..
${CMAKE_SOURCE_DIR}/../../wtf ${CMAKE_SOURCE_DIR}/../../kjsembed
${KDE4_KJS_INCLUDES} ${QT_INCLUDES} ${KDEWIN32_INCLUDES} )
+ include_directories( ${CMAKE_SOURCE_DIR}/../..
${CMAKE_SOURCE_DIR}/../../wtf ${CMAKE_SOURCE_DIR}/../../kjsembed
${KDE4_KJS_INCLUDES} ${QT_INCLUDES} ${KDEWIN_INCLUDES} )
else (NOT QTONLY_WEBKIT)
- include_directories( ${QTONLY_WEBKIT_DIR}/JavaScriptCore/kjs/
${QTONLY_WEBKIT_DIR}/JavaScriptCore/ ${CMAKE_SOURCE_DIR}/../../kjsembed
${QT_INCLUDES} ${KDEWIN32_INCLUDES} )
+ include_directories( ${QTONLY_WEBKIT_DIR}/JavaScriptCore/kjs/
${QTONLY_WEBKIT_DIR}/JavaScriptCore/ ${CMAKE_SOURCE_DIR}/../../kjsembed
${QT_INCLUDES} ${KDEWIN_INCLUDES} )
endif (NOT QTONLY_WEBKIT)
# list the subdirectories
Index: solid/solid/CMakeLists.txt
===================================================================
--- solid/solid/CMakeLists.txt (revision 979579)
+++ solid/solid/CMakeLists.txt (working copy)
@@ -4,7 +4,7 @@
include_directories( ${CMAKE_CURRENT_SOURCE_DIR} ${CMAKE_CURRENT_BINARY_DIR} )
if(WIN32)
- include_directories( ${KDEWIN32_INCLUDES} )
+ include_directories( ${KDEWIN_INCLUDES} )
endif(WIN32)
configure_file(solid_export.h.cmake ${CMAKE_CURRENT_BINARY_DIR}/solid_export.h)
@@ -196,7 +196,7 @@
set(solid_OPTIONAL_LIBS)
if(WIN32)
- set(solid_OPTIONAL_LIBS ${solid_OPTIONAL_LIBS} ${KDEWIN32_LIBRARY})
+ set(solid_OPTIONAL_LIBS ${solid_OPTIONAL_LIBS} ${KDEWIN_LIBRARY})
endif(WIN32)
if(APPLE)
Index: solid/tests/CMakeLists.txt
===================================================================
--- solid/tests/CMakeLists.txt (revision 979579)
+++ solid/tests/CMakeLists.txt (working copy)
@@ -27,7 +27,7 @@
set_target_properties(halbasictest PROPERTIES COMPILE_FLAGS -DSOLID_EXPORT=)
endif(WIN32)
-target_link_libraries(halbasictest solid_static ${KDEWIN32_LIBRARIES}
${QT_QTCORE_LIBRARY} ${QT_QTDBUS_LIBRARY} ${QT_QTXML_LIBRARY}
${QT_QTTEST_LIBRARY} )
+target_link_libraries(halbasictest solid_static ${KDEWIN_LIBRARIES}
${QT_QTCORE_LIBRARY} ${QT_QTDBUS_LIBRARY} ${QT_QTXML_LIBRARY}
${QT_QTTEST_LIBRARY} )
endif(NOT WIN32 AND NOT APPLE)
########### solidhwtest ###############
@@ -43,7 +43,7 @@
if(WIN32)
set_target_properties(solidhwtest PROPERTIES COMPILE_FLAGS -DSOLID_EXPORT=)
- set (LIBS ${KDEWIN32_LIBRARIES})
+ set (LIBS ${KDEWIN_LIBRARIES})
endif(WIN32)
target_link_libraries(solidhwtest ${QT_QTCORE_LIBRARY} ${QT_QTDBUS_LIBRARY}
${QT_QTXML_LIBRARY} ${QT_QTTEST_LIBRARY} ${LIBS} solid_static)
@@ -61,7 +61,7 @@
if(WIN32)
set_target_properties(solidmttest PROPERTIES COMPILE_FLAGS -DSOLID_EXPORT=)
- set (LIBS ${KDEWIN32_LIBRARIES})
+ set (LIBS ${KDEWIN_LIBRARIES})
endif(WIN32)
target_link_libraries(solidmttest ${QT_QTCORE_LIBRARY} ${QT_QTDBUS_LIBRARY}
${QT_QTXML_LIBRARY} ${QT_QTTEST_LIBRARY} ${LIBS} solid_static)
Index: threadweaver/Weaver/CMakeLists.txt
===================================================================
--- threadweaver/Weaver/CMakeLists.txt (revision 979579)
+++ threadweaver/Weaver/CMakeLists.txt (working copy)
@@ -1,7 +1,7 @@
include_directories(${QT_INCLUDE_DIR} ${QT_QTCORE_INCLUDE_DIR}
${CMAKE_CURRENT_SOURCE_DIR} ${CMAKE_CURRENT_BINARY_DIR})
if(WIN32)
- include_directories(${KDEWIN32_INCLUDES})
+ include_directories(${KDEWIN_INCLUDES})
endif(WIN32)
_______________________________________________
Kde-buildsystem mailing list
[email protected]
https://mail.kde.org/mailman/listinfo/kde-buildsystem