diff options
author | Aki <please@ignore.pl> | 2022-02-09 19:43:48 +0100 |
---|---|---|
committer | Aki <please@ignore.pl> | 2022-02-09 19:43:48 +0100 |
commit | 3f07a2c060c5c6d53ca6c066f50ec91bcf04b52d (patch) | |
tree | e18928dc0dcc4fad5a0647461dad843125e9bcaa /cmake/modules/AddDatafile.cmake | |
parent | 04ffc5ef04343d7d8e5490bc0f00068f54793a5b (diff) | |
download | starshatter-3f07a2c060c5c6d53ca6c066f50ec91bcf04b52d.zip starshatter-3f07a2c060c5c6d53ca6c066f50ec91bcf04b52d.tar.gz starshatter-3f07a2c060c5c6d53ca6c066f50ec91bcf04b52d.tar.bz2 |
Fixed some small issues where datafile builds would not trigger
Some cases still remain but with the current setup they would be rather hard
to fix, and they have simple workaround (make clean all).
Diffstat (limited to 'cmake/modules/AddDatafile.cmake')
-rw-r--r-- | cmake/modules/AddDatafile.cmake | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/cmake/modules/AddDatafile.cmake b/cmake/modules/AddDatafile.cmake index 6b5baf8..f68ad04 100644 --- a/cmake/modules/AddDatafile.cmake +++ b/cmake/modules/AddDatafile.cmake @@ -13,7 +13,7 @@ # # Optionally, RESOURCES can be used to specify binary resource targets from AddDownloadableResource that will provide # additional directories with files that will also get included in the final datafile. In case of conflicts, files from -# source tree will be used. +# source tree will be used. This is to allow working with binary assets located in source directory. # # To create the archive the Datafile.exe is used - for non-Windows platforms an emulator that can run it is required. @@ -61,9 +61,15 @@ function(add_datafile) $<TARGET_FILE:Datafile> $<SHELL_PATH:${DATAFILE_OUTPUT}> -mak ) endforeach() + file( + GLOB_RECURSE DATAFILE_DEPENDENCIES + LIST_DIRECTORIES true + CONFIGURE_DEPENDS + "${DATAFILE_SOURCE}/*" + ) add_custom_command( OUTPUT ${DATAFILE_OUTPUT} APPEND - DEPENDS ${DATAFILE_SOURCE} + DEPENDS ${DATAFILE_DEPENDENCIES} COMMAND ${CMAKE_COMMAND} -E chdir ${DATAFILE_SOURCE} ${CMAKE_COMMAND} -E env "${DATAFILE_VAR}='${DATAFILE_PATHS}'" |