Browse Source

tests/emscripten: add link-time dependency on the resources

Anonymous Maarten 9 months ago
parent
commit
6052136ced
1 changed files with 1 additions and 0 deletions
  1. 1 0
      test/CMakeLists.txt

+ 1 - 0
test/CMakeLists.txt

@@ -189,6 +189,7 @@ macro(add_sdl_test_executable TARGET)
             foreach(res IN LISTS RESOURCE_FILES)
                 get_filename_component(res_name "${res}" NAME)
                 target_link_options(${TARGET} PRIVATE "SHELL:--embed-file ${res}@${res_name}")
+                set_property(TARGET ${TARGET} APPEND PROPERTY LINK_DEPENDS "${res}")
             endforeach()
         endif()
         set_property(TARGET ${TARGET} APPEND PROPERTY ADDITIONAL_CLEAN_FILES "$<TARGET_FILE_DIR:${TARGET}>/$<JOIN:${RESOURCE_FILE_NAMES},$<SEMICOLON>$<TARGET_FILE_DIR:${TARGET}>/>")