diff options
author | Alexander Neundorf <neundorf@kde.org> | 2006-04-24 16:58:54 +0000 |
---|---|---|
committer | Alexander Neundorf <neundorf@kde.org> | 2006-04-24 16:58:54 +0000 |
commit | e42a4bed2af911c31674044249a01043d07cc013 (patch) | |
tree | 3d6eb2b335dcb4548cb14c558fa5ad308a5e9675 | |
parent | 729b46a8a2a05b73c304ac3f4ae9f839570d0bdc (diff) | |
download | extra-cmake-modules-e42a4bed2af911c31674044249a01043d07cc013.tar.gz extra-cmake-modules-e42a4bed2af911c31674044249a01043d07cc013.tar.bz2 |
-add the generated ui-headers to the list of sources, this helps with creating the desired rules
Alex
svn path=/trunk/KDE/kdelibs/; revision=533383
-rw-r--r-- | modules/KDE4Macros.cmake | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/modules/KDE4Macros.cmake b/modules/KDE4Macros.cmake index 6d8f89c8..f1171704 100644 --- a/modules/KDE4Macros.cmake +++ b/modules/KDE4Macros.cmake @@ -133,16 +133,16 @@ GET_FILENAME_COMPONENT(KDE4_MODULE_DIR ${CMAKE_CURRENT_LIST_FILE} PATH) #create the implementation files from the ui files and add them to the list of sources #usage: KDE4_ADD_UI_FILES(foo_SRCS ${ui_files}) -MACRO (KDE4_ADD_UI_FILES _sources ) +macro (KDE4_ADD_UI_FILES _sources ) foreach (_current_FILE ${ARGN}) - GET_FILENAME_COMPONENT(_tmp_FILE ${_current_FILE} ABSOLUTE) - GET_FILENAME_COMPONENT(_basename ${_tmp_FILE} NAME_WE) - SET(_header ${CMAKE_CURRENT_BINARY_DIR}/ui_${_basename}.h) + get_filename_component(_tmp_FILE ${_current_FILE} ABSOLUTE) + get_filename_component(_basename ${_tmp_FILE} NAME_WE) + set(_header ${CMAKE_CURRENT_BINARY_DIR}/ui_${_basename}.h) # we need to run uic and replace some things in the generated file # this is done by executing the cmake script kde4uic.cmake - ADD_CUSTOM_COMMAND(OUTPUT ${_header} + add_custom_command(OUTPUT ${_header} COMMAND ${CMAKE_COMMAND} ARGS -DKDE4_HEADER:BOOL=ON @@ -153,8 +153,9 @@ MACRO (KDE4_ADD_UI_FILES _sources ) -P ${KDE4_MODULE_DIR}/kde4uic.cmake MAIN_DEPENDENCY ${_tmp_FILE} ) + set(${_sources} ${${_sources}} ${_header}) endforeach (_current_FILE) -ENDMACRO (KDE4_ADD_UI_FILES) +endmacro (KDE4_ADD_UI_FILES) #create the implementation files from the ui files and add them to the list of sources |