Skip to content

Commit 4f49e9d

Browse files
mhdawsonrichardlau
authored andcommittedMar 25, 2024
build: build opt to set local location of headers
Some linux distroes install headers through their package managers. When headers are locally installed we'd like them to be used. Add a build time configuration option --use-prefix-to-find-headers that will will suggest to node-gyp to look for headers based on the prefix A PR to node-gyp will use this value when building addons to automatially find and use the headers if they have been installed locally Signed-off-by: Michael Dawson <midawson@redhat.com> PR-URL: #51525 Reviewed-By: Richard Lau <rlau@redhat.com> Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
1 parent 4bc8e98 commit 4f49e9d

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed
 

‎configure.py

+7
Original file line numberDiff line numberDiff line change
@@ -122,6 +122,12 @@
122122
default=None,
123123
help='force build to be considered as NOT cross compiled')
124124

125+
parser.add_argument('--use-prefix-to-find-headers',
126+
action='store_true',
127+
dest='use_prefix_to_find_headers',
128+
default=None,
129+
help='use the prefix to look for pre-installed headers')
130+
125131
parser.add_argument('--dest-os',
126132
action='store',
127133
dest='dest_os',
@@ -1249,6 +1255,7 @@ def configure_node(o):
12491255
o['variables']['debug_node'] = b(options.debug_node)
12501256
o['default_configuration'] = 'Debug' if options.debug else 'Release'
12511257
o['variables']['error_on_warn'] = b(options.error_on_warn)
1258+
o['variables']['use_prefix_to_find_headers'] = b(options.use_prefix_to_find_headers)
12521259

12531260
host_arch = host_arch_win() if os.name == 'nt' else host_arch_cc()
12541261
target_arch = options.dest_cpu or host_arch

0 commit comments

Comments
 (0)
Please sign in to comment.