Examples: Reduce size of some web examples

This commit is contained in:
SirLynix 2023-04-10 19:20:15 +02:00
parent 2c6191987f
commit 3df52dcfbe
5 changed files with 17 additions and 5 deletions

View File

@ -1,3 +1,7 @@
target("DeferredShading")
add_deps("NazaraGraphics")
add_files("main.cpp")
if is_plat("wasm") then
add_ldflags("--preload-file assets/", { force = true })
end

View File

@ -3,3 +3,7 @@ target("Physics2DDemo")
add_packages("entt")
add_files("main.cpp")
add_defines("NAZARA_ENTT")
if is_plat("wasm") then
add_ldflags("--preload-file assets/", { force = true })
end

View File

@ -3,3 +3,7 @@ target("PhysicsDemo")
add_packages("entt")
add_files("main.cpp")
add_defines("NAZARA_ENTT")
if is_plat("wasm") then
add_ldflags("--preload-file assets/", { force = true })
end

View File

@ -3,3 +3,8 @@ target("PhysicsPlayground")
add_packages("entt")
add_files("main.cpp")
add_defines("NAZARA_ENTT")
if is_plat("wasm") then
add_ldflags("--preload-file assets/examples/dev_grey.png", { force = true })
add_ldflags("--preload-file assets/examples/Spaceship", { force = true })
end

View File

@ -2,10 +2,5 @@ option("examples", { description = "Build examples", default = true })
if has_config("examples") then
set_group("Examples")
if is_plat("wasm") then
add_ldflags("--preload-file assets/", { force = true })
end
includes("*/xmake.lua")
end