mirror of
https://github.com/Llewellynvdm/conky.git
synced 2024-11-17 18:45:10 +00:00
Correct dependencies on generated header files
This change corrects dependencies on generated defconfig.h and/or convertconf.h header files because they must be generated before compilation of conky.cc and main.cc if BUILD_BUILTIN_CONFIG and/or BUILD_OLD_CONFIG are set. Fixes: https://github.com/brndnmtthws/conky/issues/1118
This commit is contained in:
parent
b49ca7bbb1
commit
b357b370c6
@ -30,8 +30,7 @@ if(BUILD_BUILTIN_CONFIG)
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/${builtin_config}
|
||||
defconfig.h defconfig
|
||||
DEPENDS ${builtin_config})
|
||||
add_custom_target(defconfig ALL DEPENDS defconfig.h)
|
||||
set_source_files_properties(defconfig.h PROPERTIES GENERATED TRUE)
|
||||
set(generated_hdr_files ${generated_hdr_files} defconfig.h)
|
||||
endif(BUILD_BUILTIN_CONFIG)
|
||||
|
||||
if(BUILD_OLD_CONFIG)
|
||||
@ -40,6 +39,7 @@ if(BUILD_OLD_CONFIG)
|
||||
${CMAKE_SOURCE_DIR}/extras/convert.lua
|
||||
convertconf.h convertconf
|
||||
DEPENDS ${CMAKE_SOURCE_DIR}/extras/convert.lua)
|
||||
add_custom_target(convertconf ALL DEPENDS convertconf.h)
|
||||
set_source_files_properties(convertconf.h PROPERTIES GENERATED TRUE)
|
||||
set(generated_hdr_files ${generated_hdr_files} convertconf.h)
|
||||
endif(BUILD_OLD_CONFIG)
|
||||
|
||||
add_custom_target(generated_hdr_files DEPENDS ${generated_hdr_files})
|
||||
|
@ -295,8 +295,10 @@ endif(BUILD_HSV_GRADIENT)
|
||||
if(BUILD_TESTS)
|
||||
# Create a library strictly for testing
|
||||
add_library(conky_core ${conky_sources} ${optional_sources})
|
||||
add_dependencies(conky_core generated_hdr_files)
|
||||
target_link_libraries(conky_core ${conky_libs})
|
||||
add_executable(conky main.cc)
|
||||
add_dependencies(conky generated_hdr_files)
|
||||
target_link_libraries(conky conky_core ${conky_libs})
|
||||
install(TARGETS conky_core
|
||||
RUNTIME DESTINATION bin
|
||||
@ -304,6 +306,7 @@ if(BUILD_TESTS)
|
||||
ARCHIVE DESTINATION ${LIB_INSTALL_DIR})
|
||||
else()
|
||||
add_executable(conky main.cc ${conky_sources} ${optional_sources})
|
||||
add_dependencies(conky generated_hdr_files)
|
||||
target_link_libraries(conky ${conky_libs})
|
||||
endif()
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user