Change resources path in web builds
This commit is contained in:
parent
155ced8410
commit
1195bd26d5
2 changed files with 3 additions and 3 deletions
|
|
@ -52,9 +52,9 @@ int main(int argc, char ** argv) try
|
||||||
log::register_thread("main");
|
log::register_thread("main");
|
||||||
|
|
||||||
#ifdef __EMSCRIPTEN__
|
#ifdef __EMSCRIPTEN__
|
||||||
// In web builds, resources are in the root of
|
// In web builds, resources are stored in
|
||||||
// the Emscripten virtual filesystem
|
// the Emscripten virtual filesystem
|
||||||
app::set_resource_root("/");
|
app::set_resource_root("/resources");
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
auto const factory = app::make_application_factory();
|
auto const factory = app::make_application_factory();
|
||||||
|
|
|
||||||
|
|
@ -218,7 +218,7 @@ function(psemek_package_files target)
|
||||||
elseif(PSEMEK_PLATFORM_WEB)
|
elseif(PSEMEK_PLATFORM_WEB)
|
||||||
foreach(_FILE IN LISTS ARGN)
|
foreach(_FILE IN LISTS ARGN)
|
||||||
target_link_options(${target} PRIVATE
|
target_link_options(${target} PRIVATE
|
||||||
"--preload-file=${CMAKE_CURRENT_LIST_DIR}/${_FILE}@/${_FILE}"
|
"--preload-file=${CMAKE_CURRENT_LIST_DIR}/${_FILE}@/resources/${_FILE}"
|
||||||
)
|
)
|
||||||
endforeach()
|
endforeach()
|
||||||
else()
|
else()
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue