-added compilation for multithreaded and singlethreaded code

-fixed problem with assets loading
This commit is contained in:
Mergul 2021-03-13 15:04:42 +01:00
parent 3eb4a40c39
commit 1254a990f1
2 changed files with 10 additions and 3 deletions

View file

@ -9,7 +9,7 @@ external_inc = include_directories('external/sources/')
# Argumesnts
not_wasm = host_machine.cpu_family() != 'wasm32'
versions = ['BindSDL_Image','SDL_208', 'BindBC_Static', 'BindSDL_Static']
versions = ['BindSDL_Image','SDL_209', 'BindBC_Static', 'BindSDL_Static', 'MM_USE_POSIX_THREADS', 'ECSEmscripten']
# Dependencies
bindbc_loader_dep = dependency('bindbc-loader')
@ -60,7 +60,14 @@ else
wasm_web = custom_target('decs-demos-wasm-web',
command: [emcc, args_wasm, '--pre-js', packed_assets, '-o', '@OUTPUT@', '@INPUT@'],
input: [sdl2_lib, ecs_lib, decs_demos_lib, ecs_utils_lib, cimgui_lib],
output: ['game.html'],
output: ['ecs_demo.html'],
build_by_default: true,
)
wasm_web_mt = custom_target('decs-demos-wasm-web-mt',
command: [emcc, args_wasm, '-s', 'USE_PTHREADS=1', '--pre-js', packed_assets, '-o', '@OUTPUT@', '@INPUT@'],
input: [sdl2_lib, ecs_lib, decs_demos_lib, ecs_utils_lib, cimgui_lib],
output: ['ecs_demo_mt.js'],
build_by_default: true,
)
summary('decs-demoswasm-index', wasm_web.full_path())