summaryrefslogtreecommitdiffstats
path: root/korganizer
diff options
context:
space:
mode:
authorSlávek Banko <slavek.banko@axis.cz>2020-02-04 00:55:27 +0100
committerSlávek Banko <slavek.banko@axis.cz>2020-02-04 00:55:27 +0100
commit53214d124e4806809fabe83d614c06e3d1552089 (patch)
tree43991147406077d418143bad748bb9feeafcca5f /korganizer
parent90c6a46c9c8d9d18e74302fa43b80ef77ce48f93 (diff)
downloadtdepim-53214d124e4806809fabe83d614c06e3d1552089.tar.gz
tdepim-53214d124e4806809fabe83d614c06e3d1552089.zip
Fix multiple processing of kcfgc files in the same directory.
Instead, processing into the current binary directory is performed. This resolves FTBFS with ninja-build. Signed-off-by: Slávek Banko <slavek.banko@axis.cz>
Diffstat (limited to 'korganizer')
-rw-r--r--korganizer/CMakeLists.txt34
1 files changed, 20 insertions, 14 deletions
diff --git a/korganizer/CMakeLists.txt b/korganizer/CMakeLists.txt
index b8c0d4d10..ab3b56155 100644
--- a/korganizer/CMakeLists.txt
+++ b/korganizer/CMakeLists.txt
@@ -158,22 +158,28 @@ tde_add_library( ${target} SHARED AUTOMOC
)
-##### korganizer (shared) #######################
+##### helper ####################################
+
+macro( process_kcfg _who _out _path _kcfg _kcfgc )
+ add_custom_command( OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/${_path}/${_out}
+ COMMAND
+ mkdir -p ${CMAKE_CURRENT_BINARY_DIR}/${_path}
+ COMMAND ${KDE3_KCFGC_EXECUTABLE}
+ -d ${CMAKE_CURRENT_BINARY_DIR}/${_path}
+ ${CMAKE_SOURCE_DIR}/${_path}/${_kcfg}
+ ${CMAKE_SOURCE_DIR}/${_path}/${_kcfgc}
+ DEPENDS
+ ${CMAKE_SOURCE_DIR}/${_path}/${_kcfg}
+ ${CMAKE_SOURCE_DIR}/${_path}/${_kcfgc} )
+ set_property( SOURCE ${_who} APPEND
+ PROPERTY OBJECT_DEPENDS ${CMAKE_CURRENT_BINARY_DIR}/${_path}/${_out} )
+endmacro( )
-add_custom_command( OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/libkcal/htmlexportsettings.h
- COMMAND
- mkdir -p ${CMAKE_CURRENT_BINARY_DIR}/libkcal
- COMMAND ${KDE3_KCFGC_EXECUTABLE}
- -d ${CMAKE_CURRENT_BINARY_DIR}/libkcal
- ${CMAKE_SOURCE_DIR}/libkcal/htmlexportsettings.kcfg
- ${CMAKE_SOURCE_DIR}/libkcal/htmlexportsettings.kcfgc
- DEPENDS
- ${CMAKE_SOURCE_DIR}/libkcal/htmlexportsettings.kcfg
- ${CMAKE_SOURCE_DIR}/libkcal/htmlexportsettings.kcfgc
-)
-set_source_files_properties( calendarview.cpp
- PROPERTIES OBJECT_DEPENDS ${CMAKE_CURRENT_BINARY_DIR}/libkcal/htmlexportsettings.h )
+##### korganizer (shared) #######################
+
+process_kcfg( calendarview.cpp htmlexportsettings.h libkcal
+ htmlexportsettings.kcfg htmlexportsettings.kcfgc )
tde_add_library( korganizer SHARED AUTOMOC
META_INCLUDES ${CMAKE_CURRENT_SOURCE_DIR}/interfaces/korganizer