From 112be735314221e342f900b84975f7eb438aa890 Mon Sep 17 00:00:00 2001 From: Sebastian Krzyszkowiak Date: Thu, 27 Jun 2019 21:24:30 +0200 Subject: [PATCH] cmake: add CONFIGURE_DEPENDS to file(GLOB...) invocations --- cmake/libsuperderpy-data.cmake | 2 +- cmake/libsuperderpy-gamestates.cmake | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/cmake/libsuperderpy-data.cmake b/cmake/libsuperderpy-data.cmake index a831895..2ecd370 100644 --- a/cmake/libsuperderpy-data.cmake +++ b/cmake/libsuperderpy-data.cmake @@ -23,5 +23,5 @@ install(DIRECTORY . DESTINATION ${DATADIR} PATTERN ".directory" EXCLUDE PATTERN "CMakeLists.txt" EXCLUDE) -file(GLOB_RECURSE RES_FILES *) +file(GLOB_RECURSE RES_FILES CONFIGURE_DEPENDS *) add_custom_target(data SOURCES ${RES_FILES}) diff --git a/cmake/libsuperderpy-gamestates.cmake b/cmake/libsuperderpy-gamestates.cmake index b081449..6eb9a3d 100644 --- a/cmake/libsuperderpy-gamestates.cmake +++ b/cmake/libsuperderpy-gamestates.cmake @@ -1,4 +1,4 @@ -FILE (GLOB gamestates "*.c") +FILE (GLOB gamestates CONFIGURE_DEPENDS "*.c") if(LIBSUPERDERPY_STATIC_GAMESTATES) set(LIBSUPERDERPY_GAMESTATES_CONSTRUCTOR "") @@ -19,7 +19,7 @@ endif(LIBSUPERDERPY_STATIC_GAMESTATES) FOREACH(gamestate ${gamestates}) get_filename_component(gamestate_name ${gamestate} NAME_WE) set(sources "${gamestate_name}.c") - FILE (GLOB submodules "${gamestate_name}/*.c") + FILE (GLOB submodules CONFIGURE_DEPENDS "${gamestate_name}/*.c") FOREACH(submodule ${submodules}) get_filename_component(submodule_name ${submodule} NAME_WE) list(APPEND sources "${gamestate_name}/${submodule_name}.c")