aboutsummaryrefslogtreecommitdiff
path: root/modules
diff options
context:
space:
mode:
authorLaurent Montel <montel@kde.org>2006-10-13 13:25:54 +0000
committerLaurent Montel <montel@kde.org>2006-10-13 13:25:54 +0000
commitf76e645f175e19dae8de7ed53151abee320fbe66 (patch)
tree15c8aa6df061957b3eba7d85be864243935911ac /modules
parent79952de539eb4dd639456fcf0d475207ec71bacf (diff)
downloadextra-cmake-modules-f76e645f175e19dae8de7ed53151abee320fbe66.tar.gz
extra-cmake-modules-f76e645f175e19dae8de7ed53151abee320fbe66.tar.bz2
Necessary to modify KDE4_ADD_KCFG_FILES to support ENABLE_FINAL
(there was not a dependancy between <name>_final.cpp file and kcfg file => kfg 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 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) (I didn't test all compile for the moment I will fix all compile today (without enable-final argument) kdelibs/kdepimlibs/kdebase/kdeutils compiles fine) Regards svn path=/trunk/KDE/kdelibs/; revision=595168
Diffstat (limited to 'modules')
-rw-r--r--modules/KDE4Macros.cmake11
1 files changed, 8 insertions, 3 deletions
diff --git a/modules/KDE4Macros.cmake b/modules/KDE4Macros.cmake
index 02c05888..506becb5 100644
--- a/modules/KDE4Macros.cmake
+++ b/modules/KDE4Macros.cmake
@@ -16,10 +16,10 @@
# Redistribution and use is allowed according to the terms of the BSD license.
# For details see the accompanying COPYING-CMAKE-SCRIPTS file.
-macro (KDE4_ADD_KCFG_FILES _sources )
- IF( ${ARGV1} STREQUAL "GENERATE_MOC" )
+macro (KDE4_ADD_KCFG_FILES _target_NAME _sources )
+ IF( ${ARGV2} STREQUAL "GENERATE_MOC" )
SET(_kcfg_generatemoc TRUE)
- ENDIF( ${ARGV1} STREQUAL "GENERATE_MOC" )
+ ENDIF( ${ARGV2} STREQUAL "GENERATE_MOC" )
foreach (_current_FILE ${ARGN})
@@ -47,6 +47,11 @@ macro (KDE4_ADD_KCFG_FILES _sources )
list(APPEND ${_sources} ${_moc_FILE})
endif(_kcfg_generatemoc)
+ if (KDE4_ENABLE_FINAL)
+ kde4_create_final_files(${CMAKE_CURRENT_BINARY_DIR}/${_target_NAME}_final_cpp.cpp _c_files ${ARGN})
+ macro_add_file_dependencies(${CMAKE_CURRENT_BINARY_DIR}/${_target_NAME}_final_cpp.cpp ${_src_FILE})
+ endif (KDE4_ENABLE_FINAL)
+
list(APPEND ${_sources} ${_src_FILE} ${_header_FILE})
endif(NOT ${_current_FILE} STREQUAL "GENERATE_MOC")
endforeach (_current_FILE)