CMake 2.8.8 will be required for kdelibs 4.10 starting October 30th
Stephen Kelly
steveire at gmail.com
Thu Nov 29 10:41:41 UTC 2012
Stephen Kelly wrote:
> Stephen Kelly <steveire <at> gmail.com> writes:
>>
>> So what can we now do in kde buildsystems to modernize them and make them
>> ready for KF5?
>
> Alex, can you comment on this?
>
>
http://article.gmane.org/gmane.comp.kde.devel.buildsystem/7545/match=required
I have this patch to kdelibs:
commit d27df2543a3e1ebc411ab325c4390a4cd4e3d155
Author: Stephen Kelly <steveire at gmail.com>
Date: Thu Nov 29 11:11:10 2012 +0100
Don't use automoc4 if CMAKE_AUTOMOC is used.
This way downstream can port to use it in KDE4.
diff --git a/cmake/modules/KDE4Macros.cmake b/cmake/modules/KDE4Macros.cmake
index 0753879..3d510dd 100644
--- a/cmake/modules/KDE4Macros.cmake
+++ b/cmake/modules/KDE4Macros.cmake
@@ -984,8 +984,11 @@ macro (KDE4_ADD_EXECUTABLE _target_NAME)
set(_add_executable_param ${_add_executable_param} EXCLUDE_FROM_ALL)
endif (_test AND NOT KDE4_BUILD_TESTS)
- _automoc4_kde4_pre_target_handling(${_target_NAME} _SRCS)
-
+ get_target_property(_tgt_AUTOMOC _target_NAME AUTOMOC)
+ if (NOT _tgt_AUTOMOC)
+ _automoc4_kde4_pre_target_handling(${_target_NAME} _SRCS)
+ endif()
+
if (KDE4_ENABLE_FINAL)
kde4_create_final_files(${CMAKE_CURRENT_BINARY_DIR}/${_target_NAME}_final_cpp.cpp
_separate_files ${_SRCS})
add_executable(${_target_NAME} ${_add_executable_param}
${CMAKE_CURRENT_BINARY_DIR}/${_target_NAME}_final_cpp.cpp
${_separate_files})
@@ -997,7 +1000,9 @@ macro (KDE4_ADD_EXECUTABLE _target_NAME)
_kde4_add_manifest(${_target_NAME})
ENDIF(KDE4_ENABLE_UAC_MANIFEST)
- _automoc4_kde4_post_target_handling(${_target_NAME})
+ if (NOT _tgt_AUTOMOC)
+ _automoc4_kde4_post_target_handling(${_target_NAME})
+ endif()
if (_test)
set_target_properties(${_target_NAME} PROPERTIES COMPILE_FLAGS -
DKDESRCDIR="\\"${CMAKE_CURRENT_SOURCE_DIR}/\\"")
@@ -1032,7 +1037,10 @@ macro (KDE4_ADD_LIBRARY _target_NAME _lib_TYPE)
set(_SRCS ${_first_SRC} ${ARGN})
- _automoc4_kde4_pre_target_handling(${_target_NAME} _SRCS)
+ get_target_property(_tgt_AUTOMOC _target_NAME AUTOMOC)
+ if (NOT _tgt_AUTOMOC)
+ _automoc4_kde4_pre_target_handling(${_target_NAME} _SRCS)
+ endif()
if (KDE4_ENABLE_FINAL)
kde4_create_final_files(${CMAKE_CURRENT_BINARY_DIR}/${_target_NAME}_final_cpp.cpp
_separate_files ${_SRCS})
@@ -1041,7 +1049,9 @@ macro (KDE4_ADD_LIBRARY _target_NAME _lib_TYPE)
add_library(${_target_NAME} ${_add_lib_param} ${_SRCS})
endif (KDE4_ENABLE_FINAL)
- _automoc4_kde4_post_target_handling(${_target_NAME})
+ if (NOT _tgt_AUTOMOC)
+ _automoc4_kde4_post_target_handling(${_target_NAME})
+ endif()
# for shared libraries a -DMAKE_target_LIB is required
string(TOUPPER ${_target_NAME} _symbol)
I think it needs to go into the next release of kdelibs so that I can
execute the plan for kdepim:
>
> * Use find_package instead of macro_optional_find_package?
> * Port from macro_feature_log to set_package_properties?
> * Port to CMAKE_AUTOMOC? Would probably require a way to disable
automoc4.
> * Use set(CMAKE_LINK_INTERFACE_LIBRARIES "") as kde4_add_library does.
> * Port to GenerateExportHeader?
>
Thanks,
Steve.
More information about the Kde-buildsystem
mailing list