This repository was archived by the owner on May 7, 2025. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathbinding.gyp
More file actions
128 lines (128 loc) · 3.34 KB
/
binding.gyp
File metadata and controls
128 lines (128 loc) · 3.34 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
{
'variables': {
'enable_asan%': 'false',
'enable_coverage%': 'false',
},
'target_defaults': {
'cflags!': [ '-fno-exceptions', '-fno-rtti', '-fvisibility=default' ],
'cflags_cc!': [ '-fno-exceptions', '-fno-rtti', '-fvisibility=default' ],
'cflags_cc': [ '-fvisibility=hidden', '-std=c++17' ],
'ldflags': [ '-Wl,-z,now' ],
'xcode_settings': {
'GCC_ENABLE_CPP_EXCEPTIONS': 'YES',
'GCC_ENABLE_CPP_RTTI': 'YES',
'CLANG_CXX_LIBRARY': 'libc++',
'OTHER_CPLUSPLUSFLAGS': [
'-frtti',
'-fexceptions',
'-std=c++17'
],
},
'conditions': [
['OS == "linux"', {
"include_dirs": [
"node_modules/gdal-async/deps/libgdal/arch/unix"
]
}],
['OS == "mac"', {
"include_dirs": [
"node_modules/gdal-async/deps/libgdal/arch/unix"
]
}],
['OS == "win"', {
"include_dirs": [
"node_modules/gdal-async/deps/libgdal/arch/win"
]
}]
],
'msvs_settings': {
'VCCLCompilerTool': {
'AdditionalOptions': [
'/MP',
'/GR',
'/EHsc',
'/wd4146',
'/wd4723',
'/std:c++17'
],
'ExceptionHandling': 1,
'RuntimeTypeInfo': 'true'
}
},
'configurations': {
'Debug': {
'cflags_cc!': [ '-O3', '-Os' ],
'defines': [ 'DEBUG' ],
'defines!': [ 'NDEBUG' ],
'xcode_settings': {
'GCC_OPTIMIZATION_LEVEL': '0',
'GCC_GENERATE_DEBUGGING_SYMBOLS': 'YES',
}
},
'Release': {
'defines': [ 'NDEBUG' ],
'defines!': [ 'DEBUG' ],
'xcode_settings': {
'GCC_OPTIMIZATION_LEVEL': 's',
'GCC_GENERATE_DEBUGGING_SYMBOLS': 'NO',
'DEAD_CODE_STRIPPING': 'YES',
'GCC_INLINES_ARE_PRIVATE_EXTERN': 'YES'
},
'ldflags': [
'-Wl,-s'
],
'msvs_settings': {
'VCCLCompilerTool': {
'DebugInformationFormat': '0',
},
'VCLinkerTool': {
'GenerateDebugInformation': 'false',
}
}
}
}
},
'targets': [
{
'target_name': 'gdal-exprtk',
'sources': [
'src/pixelFn.cc'
],
'include_dirs': [
'node_modules/gdal-async/include',
'node_modules/gdal-async/deps/libgdal/gdal/alg',
'node_modules/gdal-async/deps/libgdal/gdal/gcore',
'node_modules/gdal-async/deps/libgdal/gdal/port',
'node_modules/gdal-async/deps/libgdal/gdal/apps',
'node_modules/gdal-async/deps/libgdal/gdal/ogr',
'node_modules/gdal-async/deps/libgdal/gdal/ogr/ogrsf_frmts',
'node_modules/exprtk.js/include',
'<!@(node -p "require(\'node-addon-api\').include")'
],
'dependencies': ['<!(node -p "require(\'node-addon-api\').gyp")'],
'conditions': [
['enable_asan == "true"', {
'cflags_cc': [ '-fsanitize=address' ],
'ldflags' : [ '-fsanitize=address' ]
}],
["enable_coverage == 'true'", {
'cflags_cc': [ '-fprofile-arcs', '-ftest-coverage' ],
'ldflags' : [ '-lgcov', '--coverage' ]
}]
]
},
{
'target_name': 'action_after_build',
'type': 'none',
'dependencies': [ '<(module_name)' ],
'copies': [
{
'files': [
'<(PRODUCT_DIR)/gdal-exprtk.node',
],
'destination': '<(module_path)'
}
]
}
]
}