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

This commit is contained in:
Anonymous Maarten 2024-07-03 03:22:19 +02:00 committed by Anonymous Maarten
parent 5415909f2d
commit 6052136ced
1 changed files with 1 additions and 0 deletions

View File

@ -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}>/>")