diff options
author | Aki <please@ignore.pl> | 2022-02-09 19:18:01 +0100 |
---|---|---|
committer | Aki <please@ignore.pl> | 2022-02-09 19:18:01 +0100 |
commit | 04ffc5ef04343d7d8e5490bc0f00068f54793a5b (patch) | |
tree | 40ca4d9e1eca680a5b5a158f4899bf051bc2b4c8 /cmake | |
parent | 9ea64a9714712961a60fa436ccdaf3fd7c3a09e3 (diff) | |
download | starshatter-04ffc5ef04343d7d8e5490bc0f00068f54793a5b.zip starshatter-04ffc5ef04343d7d8e5490bc0f00068f54793a5b.tar.gz starshatter-04ffc5ef04343d7d8e5490bc0f00068f54793a5b.tar.bz2 |
Changed order of adding the files to datafile archives
Diffstat (limited to 'cmake')
-rw-r--r-- | cmake/modules/AddDatafile.cmake | 18 |
1 files changed, 11 insertions, 7 deletions
diff --git a/cmake/modules/AddDatafile.cmake b/cmake/modules/AddDatafile.cmake index f54b892..6b5baf8 100644 --- a/cmake/modules/AddDatafile.cmake +++ b/cmake/modules/AddDatafile.cmake @@ -12,7 +12,8 @@ # target name with ".dat" suffix. # # 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. +# additional directories with files that will also get included in the final datafile. In case of conflicts, files from +# source tree will be used. # # To create the archive the Datafile.exe is used - for non-Windows platforms an emulator that can run it is required. @@ -45,13 +46,7 @@ function(add_datafile) endif() add_custom_command( OUTPUT ${DATAFILE_OUTPUT} - DEPENDS ${DATAFILE_SOURCE} COMMAND ${CMAKE_COMMAND} -E rm -f ${DATAFILE_OUTPUT} - COMMAND - ${CMAKE_COMMAND} -E chdir ${DATAFILE_SOURCE} - ${CMAKE_COMMAND} -E env "${DATAFILE_VAR}='${DATAFILE_PATHS}'" - ${CMAKE_CORSSCOMPILING_EMULATOR} - $<TARGET_FILE:Datafile> $<SHELL_PATH:${DATAFILE_OUTPUT}> -mak COMMENT "Creating datafile ${DATAFILE_TARGET}" ) foreach(RESOURCE_TARGET IN ITEMS ${DATAFILE_RESOURCES}) @@ -66,5 +61,14 @@ function(add_datafile) $<TARGET_FILE:Datafile> $<SHELL_PATH:${DATAFILE_OUTPUT}> -mak ) endforeach() + add_custom_command( + OUTPUT ${DATAFILE_OUTPUT} APPEND + DEPENDS ${DATAFILE_SOURCE} + COMMAND + ${CMAKE_COMMAND} -E chdir ${DATAFILE_SOURCE} + ${CMAKE_COMMAND} -E env "${DATAFILE_VAR}='${DATAFILE_PATHS}'" + ${CMAKE_CORSSCOMPILING_EMULATOR} + $<TARGET_FILE:Datafile> $<SHELL_PATH:${DATAFILE_OUTPUT}> -mak + ) add_custom_target(${DATAFILE_TARGET} ALL DEPENDS ${DATAFILE_OUTPUT}) endfunction() |