From 6052136ceda5bd1fb85f8d5b904076018fdf6f16 Mon Sep 17 00:00:00 2001
From: Anonymous Maarten <[EMAIL REDACTED]>
Date: Wed, 3 Jul 2024 03:22:19 +0200
Subject: [PATCH] tests/emscripten: add link-time dependency on the resources
---
test/CMakeLists.txt | 1 +
1 file changed, 1 insertion(+)
diff --git a/test/CMakeLists.txt b/test/CMakeLists.txt
index 92c531ecc039a..c325e91ae4dc8 100644
--- a/test/CMakeLists.txt
+++ b/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}>/>")