Examples: Reduce size of some web examples
This commit is contained in:
@@ -1,3 +1,7 @@
|
|||||||
target("DeferredShading")
|
target("DeferredShading")
|
||||||
add_deps("NazaraGraphics")
|
add_deps("NazaraGraphics")
|
||||||
add_files("main.cpp")
|
add_files("main.cpp")
|
||||||
|
|
||||||
|
if is_plat("wasm") then
|
||||||
|
add_ldflags("--preload-file assets/", { force = true })
|
||||||
|
end
|
||||||
|
|||||||
@@ -3,3 +3,7 @@ target("Physics2DDemo")
|
|||||||
add_packages("entt")
|
add_packages("entt")
|
||||||
add_files("main.cpp")
|
add_files("main.cpp")
|
||||||
add_defines("NAZARA_ENTT")
|
add_defines("NAZARA_ENTT")
|
||||||
|
|
||||||
|
if is_plat("wasm") then
|
||||||
|
add_ldflags("--preload-file assets/", { force = true })
|
||||||
|
end
|
||||||
|
|||||||
@@ -3,3 +3,7 @@ target("PhysicsDemo")
|
|||||||
add_packages("entt")
|
add_packages("entt")
|
||||||
add_files("main.cpp")
|
add_files("main.cpp")
|
||||||
add_defines("NAZARA_ENTT")
|
add_defines("NAZARA_ENTT")
|
||||||
|
|
||||||
|
if is_plat("wasm") then
|
||||||
|
add_ldflags("--preload-file assets/", { force = true })
|
||||||
|
end
|
||||||
|
|||||||
@@ -3,3 +3,8 @@ target("PhysicsPlayground")
|
|||||||
add_packages("entt")
|
add_packages("entt")
|
||||||
add_files("main.cpp")
|
add_files("main.cpp")
|
||||||
add_defines("NAZARA_ENTT")
|
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
|
||||||
|
|||||||
@@ -2,10 +2,5 @@ option("examples", { description = "Build examples", default = true })
|
|||||||
|
|
||||||
if has_config("examples") then
|
if has_config("examples") then
|
||||||
set_group("Examples")
|
set_group("Examples")
|
||||||
|
|
||||||
if is_plat("wasm") then
|
|
||||||
add_ldflags("--preload-file assets/", { force = true })
|
|
||||||
end
|
|
||||||
|
|
||||||
includes("*/xmake.lua")
|
includes("*/xmake.lua")
|
||||||
end
|
end
|
||||||
|
|||||||
Reference in New Issue
Block a user