sharp/src/emscripten/common.gypi
Lovell Fuller a8f68ba7f0
Add infrastructure to build and publish as wasm32 (#3840)
Co-authored-by: Ingvar Stepanyan <me@rreverser.com>
2023-11-09 14:46:07 +00:00

41 lines
953 B
Python

# Copyright 2013 Lovell Fuller and others.
# SPDX-License-Identifier: Apache-2.0
{
'variables': {
'OS': 'emscripten'
},
'target_defaults': {
'default_configuration': 'Release',
'type': 'executable',
'cflags': [
'-pthread',
'-sDEFAULT_TO_CXX=0'
],
'cflags_cc': [
'-pthread'
],
'ldflags': [
'--js-library=<!(node -p "require(\'emnapi\').js_library")',
'-sAUTO_JS_LIBRARIES=0',
'-sAUTO_NATIVE_LIBRARIES=0',
'-sNODEJS_CATCH_EXIT=0',
'-sNODEJS_CATCH_REJECTION=0'
],
'defines': [
'__STDC_FORMAT_MACROS',
'BUILDING_NODE_EXTENSION',
'EMNAPI_WORKER_POOL_SIZE=1'
],
'include_dirs': [
'<!(node -p "require(\'emnapi\').include")'
],
'sources': [
'<!@(node -p "require(\'emnapi\').sources.map(x => JSON.stringify(path.relative(process.cwd(), x))).join(\' \')")'
],
'configurations': {
'Release': {}
}
}
}