1
project('NativeBridge', 'c', 'cpp',
3
default_options: ['cpp_std=c++17', 'buildtype=debug']
11
use_dummy_libace = true
14
gen_dir = '../generated/' + source_set
21
gen_dir + '/common-interop.cc',
22
gen_dir + '/custom.cc',
23
gen_dir + '/bridge.cc',
27
gen_dir + '/dummy_impl.cc'
31
is_msvc = meson.get_compiler('cpp').get_id() == 'msvc'
33
oses = { 'emscripten': 'wasm', 'darwin': 'macos' } # rename meson default names to convienient ones
34
archs = { 'x86_64': 'x64', 'aarch64': 'arm64', 'wasm32': 'wasm' }
36
os = target_machine.system()
38
arch = target_machine.cpu()
39
arch = archs.get(arch, arch)
41
cxx = meson.get_compiler('cpp')
46
# library_name = 'NativeBridge-' + os + '-' + arch
47
library_name = 'NativeBridge'
50
cflags += ['-DKOALA_USE_NODE_VM', '-DKOALA_NAPI', '-DINTEROP_LIBRARY_NAME=' + library_name]
52
'../node-api-headers/include',
56
gen_dir + '/convertors-node.cc'
59
cflags += ['-DKOALA_WINDOWS']
60
sources += [ gen-dir + '/win-dynamic-node.cc' ]
66
shared_library(library_name,
72
name_prefix: module_prefix,
73
name_suffix: module_suffix,
74
include_directories: include_dirs,
75
install_dir: meson.current_source_dir(),