cmake: add CONFIGURE_DEPENDS to file(GLOB...) invocations

This commit is contained in:
Sebastian Krzyszkowiak 2019-06-27 21:24:30 +02:00
parent 5757c5170a
commit 112be73531
No known key found for this signature in database
GPG key ID: E8F235CF3BDBC3FF
2 changed files with 3 additions and 3 deletions

View file

@ -23,5 +23,5 @@ install(DIRECTORY . DESTINATION ${DATADIR}
PATTERN ".directory" EXCLUDE PATTERN ".directory" EXCLUDE
PATTERN "CMakeLists.txt" EXCLUDE) PATTERN "CMakeLists.txt" EXCLUDE)
file(GLOB_RECURSE RES_FILES *) file(GLOB_RECURSE RES_FILES CONFIGURE_DEPENDS *)
add_custom_target(data SOURCES ${RES_FILES}) add_custom_target(data SOURCES ${RES_FILES})

View file

@ -1,4 +1,4 @@
FILE (GLOB gamestates "*.c") FILE (GLOB gamestates CONFIGURE_DEPENDS "*.c")
if(LIBSUPERDERPY_STATIC_GAMESTATES) if(LIBSUPERDERPY_STATIC_GAMESTATES)
set(LIBSUPERDERPY_GAMESTATES_CONSTRUCTOR "") set(LIBSUPERDERPY_GAMESTATES_CONSTRUCTOR "")
@ -19,7 +19,7 @@ endif(LIBSUPERDERPY_STATIC_GAMESTATES)
FOREACH(gamestate ${gamestates}) FOREACH(gamestate ${gamestates})
get_filename_component(gamestate_name ${gamestate} NAME_WE) get_filename_component(gamestate_name ${gamestate} NAME_WE)
set(sources "${gamestate_name}.c") set(sources "${gamestate_name}.c")
FILE (GLOB submodules "${gamestate_name}/*.c") FILE (GLOB submodules CONFIGURE_DEPENDS "${gamestate_name}/*.c")
FOREACH(submodule ${submodules}) FOREACH(submodule ${submodules})
get_filename_component(submodule_name ${submodule} NAME_WE) get_filename_component(submodule_name ${submodule} NAME_WE)
list(APPEND sources "${gamestate_name}/${submodule_name}.c") list(APPEND sources "${gamestate_name}/${submodule_name}.c")