Add web target to SDL example (without SDL3 files)
This commit is contained in:
parent
c9ffc52ee4
commit
ab0163e60f
|
|
@ -2,3 +2,7 @@
|
||||||
/build
|
/build
|
||||||
/build.ninja
|
/build.ninja
|
||||||
/shuriken.override.yaml
|
/shuriken.override.yaml
|
||||||
|
|
||||||
|
# SDL3 files
|
||||||
|
/lib
|
||||||
|
/vendor
|
||||||
|
|
|
||||||
|
|
@ -8,3 +8,17 @@ default_target: linux
|
||||||
targets:
|
targets:
|
||||||
linux:
|
linux:
|
||||||
output_file: sdl_example
|
output_file: sdl_example
|
||||||
|
|
||||||
|
# NOTE: To build for web, you need a) emscripten installed on your system, b) the SDL3 and SDL3_image headers in the
|
||||||
|
# vendor directory, and c) static libraries for SDL3 and SDL3_image compiled for WebAssembly in the lib directory.
|
||||||
|
# These are not contained in this repository to keep the repository data small.
|
||||||
|
web:
|
||||||
|
cpp_compiler: em++
|
||||||
|
cpp_flags_extra: -Ivendor
|
||||||
|
linker_args: >-
|
||||||
|
lib/web/libSDL3.a
|
||||||
|
lib/web/libSDL3_image.a
|
||||||
|
--use-preload-plugins
|
||||||
|
--preload-file assets/
|
||||||
|
output_file: output/index.html
|
||||||
|
run_command: python -m http.server -d build/web/output
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue