mirror of https://github.com/bjornbytes/lovr.git
tup: Don't export webxr_attach/webxr_detach if webxr is disabled;
This commit is contained in:
parent
9a54102387
commit
41dfd64548
|
@ -145,11 +145,13 @@ if target == 'wasm' then
|
||||||
cflags += '-std=gnu11'
|
cflags += '-std=gnu11'
|
||||||
cflags += '-D_POSIX_C_SOURCE=200809L'
|
cflags += '-D_POSIX_C_SOURCE=200809L'
|
||||||
lflags += '-s FORCE_FILESYSTEM'
|
lflags += '-s FORCE_FILESYSTEM'
|
||||||
lflags += ([[-s EXPORTED_FUNCTIONS="['_main','_lovrDestroy','_webxr_attach','_webxr_detach']"]])
|
exported_functions = { '_main', '_lovrDestroy' }
|
||||||
if config.headsets.webxr then
|
if config.headsets.webxr then
|
||||||
|
exported_functions += { '_webxr_attach', '_webxr_detach' }
|
||||||
lflags += '--js-library etc/webxr.js'
|
lflags += '--js-library etc/webxr.js'
|
||||||
end
|
end
|
||||||
lflags += '--shell-file etc/lovr.html'
|
lflags += '--shell-file etc/lovr.html'
|
||||||
|
lflags += '-s EXPORTED_FUNCTIONS=' .. table.concat(exported_functions, ',')
|
||||||
extras += { 'bin/lovr.js', 'bin/lovr.wasm' }
|
extras += { 'bin/lovr.js', 'bin/lovr.wasm' }
|
||||||
if config.modules.thread then
|
if config.modules.thread then
|
||||||
cflags += '-s USE_PTHREADS=1'
|
cflags += '-s USE_PTHREADS=1'
|
||||||
|
|
Loading…
Reference in New Issue