Change resources path in web builds

This commit is contained in:
Nikita Lisitsa 2026-07-05 18:38:47 +03:00
parent 155ced8410
commit 1195bd26d5
2 changed files with 3 additions and 3 deletions

View file

@ -52,9 +52,9 @@ int main(int argc, char ** argv) try
log::register_thread("main");
#ifdef __EMSCRIPTEN__
// In web builds, resources are in the root of
// In web builds, resources are stored in
// the Emscripten virtual filesystem
app::set_resource_root("/");
app::set_resource_root("/resources");
#endif
auto const factory = app::make_application_factory();

View file

@ -218,7 +218,7 @@ function(psemek_package_files target)
elseif(PSEMEK_PLATFORM_WEB)
foreach(_FILE IN LISTS ARGN)
target_link_options(${target} PRIVATE
"--preload-file=${CMAKE_CURRENT_LIST_DIR}/${_FILE}@/${_FILE}"
"--preload-file=${CMAKE_CURRENT_LIST_DIR}/${_FILE}@/resources/${_FILE}"
)
endforeach()
else()