From f76e645f175e19dae8de7ed53151abee320fbe66 Mon Sep 17 00:00:00 2001 From: Laurent Montel Date: Fri, 13 Oct 2006 13:25:54 +0000 Subject: Necessary to modify KDE4_ADD_KCFG_FILES to support ENABLE_FINAL (there was not a dependancy between _final.cpp file and kcfg file => kfg files were never created) Not necessary to rebuild all kdelibs just cp kdelibs/cmake/modules/KDE4Macros.cmake /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 --- modules/KDE4Macros.cmake | 11 ++++++++--- 1 file 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) -- cgit v1.2.1