Browse Source

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>
pull/39/head
Slávek Banko 6 months ago
parent
commit
53214d124e
No known key found for this signature in database GPG Key ID: 608F5293A04BE668
3 changed files with 28 additions and 22 deletions
  1. +4
    -4
      konsolekalendar/CMakeLists.txt
  2. +20
    -14
      korganizer/CMakeLists.txt
  3. +4
    -4
      wizards/CMakeLists.txt

+ 4
- 4
konsolekalendar/CMakeLists.txt View File

@@ -38,18 +38,18 @@ install( FILES konsolekalendar.desktop DESTINATION ${XDG_APPS_INSTALL_DIR} )
##### helper ####################################

macro( process_kcfg _who _out _path _kcfg _kcfgc )
add_custom_command( OUTPUT ${CMAKE_BINARY_DIR}/${_path}/${_out}
add_custom_command( OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/${_path}/${_out}
COMMAND
mkdir -p ${CMAKE_BINARY_DIR}/${_path}
mkdir -p ${CMAKE_CURRENT_BINARY_DIR}/${_path}
COMMAND ${KDE3_KCFGC_EXECUTABLE}
-d ${CMAKE_BINARY_DIR}/${_path}
-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_BINARY_DIR}/${_path}/${_out} )
PROPERTY OBJECT_DEPENDS ${CMAKE_CURRENT_BINARY_DIR}/${_path}/${_out} )
endmacro( )




+ 20
- 14
korganizer/CMakeLists.txt View File

@@ -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


+ 4
- 4
wizards/CMakeLists.txt View File

@@ -58,18 +58,18 @@ install( FILES
##### helper ####################################

macro( process_kcfg _who _out _path _kcfg _kcfgc )
add_custom_command( OUTPUT ${CMAKE_BINARY_DIR}/${_path}/${_out}
add_custom_command( OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/${_path}/${_out}
COMMAND
mkdir -p ${CMAKE_BINARY_DIR}/${_path}
mkdir -p ${CMAKE_CURRENT_BINARY_DIR}/${_path}
COMMAND ${KDE3_KCFGC_EXECUTABLE}
-d ${CMAKE_BINARY_DIR}/${_path}
-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_BINARY_DIR}/${_path}/${_out} )
PROPERTY OBJECT_DEPENDS ${CMAKE_CURRENT_BINARY_DIR}/${_path}/${_out} )
endmacro()




Loading…
Cancel
Save