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")