mirror of
https://github.com/keymanapp/keyman.git
synced 2026-08-05 00:15:32 +00:00
chore(core): cleanup meson.build
This commit is contained in:
parent
1bedc62b57
commit
067c8a0a5b
2 changed files with 10 additions and 7 deletions
|
|
@ -37,7 +37,7 @@ endif
|
|||
|
||||
# shared with a number of subdirs
|
||||
if cpp_compiler.get_id() == 'emscripten'
|
||||
wasm_exported_runtime_methods = '-sEXPORTED_RUNTIME_METHODS=[\'UTF8ToString\',\'stringToNewUTF8\']'
|
||||
wasm_exported_runtime_methods = '-sEXPORTED_RUNTIME_METHODS=[\'UTF8ToString\',\'stringToNewUTF8\',\'wasmExports\']'
|
||||
endif
|
||||
|
||||
subdir('docs/internal')
|
||||
|
|
|
|||
|
|
@ -138,11 +138,14 @@ mock_files = files(
|
|||
'mock/mock_processor.cpp',
|
||||
)
|
||||
|
||||
extra_defns = []
|
||||
extra_links = []
|
||||
if cpp_compiler.get_id() == 'emscripten'
|
||||
links += [
|
||||
'-sEXPORTED_RUNTIME_METHODS=[\'UTF8ToString\',\'stringToNewUTF8\',\'wasmExports\']',
|
||||
extra_defns += ['-g']
|
||||
extra_links += ['-sSAFE_HEAP=1', wasm_exported_runtime_methods,
|
||||
# Forcing inclusion of debug symbols
|
||||
'-g', '-Wlimited-postlink-optimizations',
|
||||
'--emit-tsd', 'keymancore.d.ts',
|
||||
'-lembind'
|
||||
]
|
||||
host_links = [
|
||||
|
|
@ -163,8 +166,8 @@ lib = library('keymancore',
|
|||
mock_files,
|
||||
version_res,
|
||||
generated_headers,
|
||||
cpp_args: defns + warns + flags,
|
||||
link_args: links,
|
||||
cpp_args: defns + extra_defns + warns + flags,
|
||||
link_args: links + extra_links,
|
||||
version: lib_version,
|
||||
include_directories: inc,
|
||||
pic: true,
|
||||
|
|
@ -187,9 +190,9 @@ pkg.generate(
|
|||
if cpp_compiler.get_id() == 'emscripten'
|
||||
# Build an executable
|
||||
host = executable('km-core',
|
||||
cpp_args: defns,
|
||||
cpp_args: defns + extra_defns,
|
||||
include_directories: inc,
|
||||
link_args: links + host_links,
|
||||
link_args: links + host_links + extra_links,
|
||||
objects: lib.extract_all_objects(recursive: false))
|
||||
|
||||
if get_option('buildtype') == 'release'
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue