File: binding.gyp

package info (click to toggle)
node-addon-api 8.3.1-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 2,248 kB
  • sloc: cpp: 15,431; javascript: 5,631; ansic: 157; makefile: 7
file content (160 lines) | stat: -rw-r--r-- 5,633 bytes parent folder | download
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
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
{
  'target_defaults': {
    'includes': ['../common.gypi'],
    'include_dirs': ['./common'],
    'variables': {
      'build_sources': [
        'addon.cc',
        'addon_data.cc',
        'array_buffer.cc',
        'async_context.cc',
        'async_progress_queue_worker.cc',
        'async_progress_worker.cc',
        'async_worker.cc',
        'async_worker_persistent.cc',
        'basic_types/array.cc',
        'basic_types/boolean.cc',
        'basic_types/number.cc',
        'basic_types/value.cc',
        'bigint.cc',
        'callbackInfo.cc',
        'date.cc',
        'binding.cc',
        'buffer_no_external.cc',
        'buffer.cc',
        'callbackscope.cc',
        'dataview/dataview.cc',
        'dataview/dataview_read_write.cc',
        'env_cleanup.cc',
        'env_misc.cc',
        'error.cc',
        'error_handling_for_primitives.cc',
        'external.cc',
        'finalizer_order.cc',
        'function.cc',
        'function_reference.cc',
        'handlescope.cc',
        'maybe/check.cc',
        'movable_callbacks.cc',
        'memory_management.cc',
        'name.cc',
        'globalObject/global_object_delete_property.cc',
        'globalObject/global_object_has_own_property.cc',
        'globalObject/global_object_set_property.cc',
        'globalObject/global_object_get_property.cc',
        'globalObject/global_object.cc',
        'object/delete_property.cc',
        'object/finalizer.cc',
        'object/get_property.cc',
        'object/has_own_property.cc',
        'object/has_property.cc',
        'object/object.cc',
        'object/object_freeze_seal.cc',
        'object/set_property.cc',
        'object/subscript_operator.cc',
        'promise.cc',
        'run_script.cc',
        'symbol.cc',
        'threadsafe_function/threadsafe_function_ctx.cc',
        'threadsafe_function/threadsafe_function_exception.cc',
        'threadsafe_function/threadsafe_function_existing_tsfn.cc',
        'threadsafe_function/threadsafe_function_ptr.cc',
        'threadsafe_function/threadsafe_function_sum.cc',
        'threadsafe_function/threadsafe_function_unref.cc',
        'threadsafe_function/threadsafe_function.cc',
        'type_taggable.cc',
        'typed_threadsafe_function/typed_threadsafe_function_ctx.cc',
        'typed_threadsafe_function/typed_threadsafe_function_exception.cc',
        'typed_threadsafe_function/typed_threadsafe_function_existing_tsfn.cc',
        'typed_threadsafe_function/typed_threadsafe_function_ptr.cc',
        'typed_threadsafe_function/typed_threadsafe_function_sum.cc',
        'typed_threadsafe_function/typed_threadsafe_function_unref.cc',
        'typed_threadsafe_function/typed_threadsafe_function.cc',
        'typedarray.cc',
        'objectwrap.cc',
        'objectwrap_constructor_exception.cc',
        'objectwrap_function.cc',
        'objectwrap_removewrap.cc',
        'objectwrap_multiple_inheritance.cc',
        'object_reference.cc',
        'reference.cc',
        'version_management.cc',
        'thunking_manual.cc',
      ],
      'build_sources_swallowexcept': [
        'binding-swallowexcept.cc',
        'error.cc',
      ],
      'build_sources_except_all': [
        'except_all.cc',
      ],
      'build_sources_type_check': [
        'value_type_cast.cc'
      ],
      'want_coverage': '<!(node -p process.env.npm_config_coverage)',
      'use_node_api_headers': '<!(node -p process.env.use_node_api_headers)',
      'conditions': [
        ['disable_deprecated!="true"', {
          'build_sources': ['object/object_deprecated.cc']
        }]
      ]
    },
    'conditions': [
      ['want_coverage=="true" and OS=="linux"', {
        'cflags_cc': ['--coverage'],
        'ldflags': ['--coverage'],
      }],
      ['use_node_api_headers=="true"', {
        # prepend to the include_dirs list
        'include_dirs+': ["<!(node -p \"require('node-api-headers').include_dir\")"],
      }],
    ],
  },
  'targets': [
    {
      'target_name': 'binding',
      'dependencies': ['../node_addon_api.gyp:node_addon_api_except'],
      'sources': ['>@(build_sources)'],
      'defines': ['NODE_ADDON_API_ENABLE_TYPE_CHECK_ON_AS']
    },
    {
      'target_name': 'binding_except_all',
      'dependencies': ['../node_addon_api.gyp:node_addon_api_except_all'],
      'sources': [ '>@(build_sources_except_all)']
    },
    {
      'target_name': 'binding_noexcept',
      'dependencies': ['../node_addon_api.gyp:node_addon_api'],
      'sources': ['>@(build_sources)']
    },
    {
      'target_name': 'binding_noexcept_maybe',
      'dependencies': ['../node_addon_api.gyp:node_addon_api_maybe'],
      'sources': ['>@(build_sources)'],
    },
    {
      'target_name': 'binding_swallowexcept',
      'dependencies': ['../node_addon_api.gyp:node_addon_api_except'],
      'sources': [ '>@(build_sources_swallowexcept)'],
      'defines': ['NODE_API_SWALLOW_UNTHROWABLE_EXCEPTIONS']
    },
    {
      'target_name': 'binding_swallowexcept_noexcept',
      'dependencies': ['../node_addon_api.gyp:node_addon_api'],
      'sources': ['>@(build_sources_swallowexcept)'],
      'defines': ['NODE_API_SWALLOW_UNTHROWABLE_EXCEPTIONS']
    },
    {
      'target_name': 'binding_type_check',
      'dependencies': ['../node_addon_api.gyp:node_addon_api'],
      'sources': ['>@(build_sources_type_check)'],
      'defines': ['NODE_ADDON_API_ENABLE_TYPE_CHECK_ON_AS']
    },
    {
      'target_name': 'binding_custom_namespace',
      'dependencies': ['../node_addon_api.gyp:node_addon_api'],
      'sources': ['>@(build_sources)'],
      'defines': ['NAPI_CPP_CUSTOM_NAMESPACE=cstm']
    },
  ],
}