diff options
author | Laurent Montel <montel@kde.org> | 2006-10-13 07:53:19 +0000 |
---|---|---|
committer | Laurent Montel <montel@kde.org> | 2006-10-13 07:53:19 +0000 |
commit | 1d9d844a2cfa191d9dbc51376ae16ca519141b07 (patch) | |
tree | 782fd6a1ed97c577ae2a7c2eeca1781bc36a6f51 | |
parent | f9b4b1934e26c4c7d08490c93f168c070140c2da (diff) | |
download | extra-cmake-modules-1d9d844a2cfa191d9dbc51376ae16ca519141b07.tar.gz extra-cmake-modules-1d9d844a2cfa191d9dbc51376ae16ca519141b07.tar.bz2 |
Necessary to change KDE4_AUTOMOC macro to support
enable-final argument
(there was not a dependancy between <name>_final.cpp file and
moc generated files => moc files were never created)
Not necessary to rebuild all kdelibs just cp kdelibs/cmake/modules/KDE4Macros.cmake <path_kde4>/share/apps/cmake/modules
I ported and tested all kde module (without enable-final argument, it compiles fines (test and program))
Don't try to use enable-final argument for the moment it doesn't compile (but dependancy works)
Regards
svn path=/trunk/KDE/kdelibs/; revision=595037
The following changes were in SVN, but were removed from git:
M pics/CMakeLists.txt
-rw-r--r-- | modules/KDE4Macros.cmake | 15 |
1 files changed, 8 insertions, 7 deletions
diff --git a/modules/KDE4Macros.cmake b/modules/KDE4Macros.cmake index 84057935..463d891f 100644 --- a/modules/KDE4Macros.cmake +++ b/modules/KDE4Macros.cmake @@ -1,4 +1,3 @@ - # for documentation look at FindKDE4Internal.cmake # # this file contains the following macros: @@ -137,7 +136,7 @@ macro (KDE4_ADD_UI3_FILES _sources ) endmacro (KDE4_ADD_UI3_FILES) -macro (KDE4_AUTOMOC) +macro (KDE4_AUTOMOC _target_NAME) qt4_get_moc_inc_dirs(_moc_INCS) set(_matching_FILES ) @@ -156,14 +155,12 @@ macro (KDE4_AUTOMOC) if (EXISTS ${_abs_FILE} AND NOT _skip) file(READ ${_abs_FILE} _contents) - get_filename_component(_abs_PATH ${_abs_FILE} PATH) string(REGEX MATCHALL "#include +[^ ]+\\.moc[\">]" _match "${_contents}") if (_match) foreach (_current_MOC_INC ${_match}) string(REGEX MATCH "[^ <\"]+\\.moc" _current_MOC "${_current_MOC_INC}") - get_filename_component(_basename ${_current_MOC} NAME_WE) set(_header ${_abs_PATH}/${_basename}.h) set(_moc ${CMAKE_CURRENT_BINARY_DIR}/${_current_MOC}) @@ -177,15 +174,19 @@ macro (KDE4_AUTOMOC) ARGS ${_moc_INCS} ${_header} -o ${_moc} MAIN_DEPENDENCY ${_header} ) - - macro_add_file_dependencies(${_abs_FILE} ${_moc}) + if (KDE4_ENABLE_FINAL) + #kde4_create_final_files(${CMAKE_CURRENT_BINARY_DIR}/${_target_NAME}_final_cpp.cpp _c_files ${_SRCS}) + macro_add_file_dependencies(${CMAKE_CURRENT_BINARY_DIR}/${_target_NAME}_final_cpp.cpp ${_moc}) + else (KDE4_ENABLE_FINAL) + macro_add_file_dependencies(${_abs_FILE} ${_moc}) + endif (KDE4_ENABLE_FINAL) endforeach (_current_MOC_INC) endif (_match) endif (EXISTS ${_abs_FILE} AND NOT _skip) endforeach (_current_FILE) -endmacro (KDE4_AUTOMOC) +endmacro (KDE4_AUTOMOC _target_NAME) # only used internally by KDE4_INSTALL_ICONS |