Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add correct shared library naming on OS X #7687

Closed
wants to merge 1 commit into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 5 additions & 1 deletion configure
Original file line number Diff line number Diff line change
Expand Up @@ -840,7 +840,11 @@ def configure_node(o):

o['variables']['node_no_browser_globals'] = b(options.no_browser_globals)
o['variables']['node_shared'] = b(options.shared)
o['variables']['node_module_version'] = int(getmoduleversion.get_version())
node_module_version = getmoduleversion.get_version()
shlib_suffix = '%s.dylib' if sys.platform == 'darwin' else 'so.%s'
shlib_suffix %= node_module_version
o['variables']['node_module_version'] = int(node_module_version)
o['variables']['shlib_suffix'] = shlib_suffix

if options.linked_module:
o['variables']['library_files'] = options.linked_module
Expand Down
2 changes: 1 addition & 1 deletion node.gyp
Original file line number Diff line number Diff line change
Expand Up @@ -249,7 +249,7 @@
],
'conditions': [
[ 'node_module_version!="" and OS!="win"', {
'product_extension': 'so.<(node_module_version)',
'product_extension': '<(shlib_suffix)',
}]
],
}],
Expand Down
9 changes: 5 additions & 4 deletions tools/install.py
Original file line number Diff line number Diff line change
Expand Up @@ -118,10 +118,11 @@ def files(action):
if is_windows:
output_file += '.dll'
else:
# GYP will output to lib.target, this is hardcoded in its source,
# see the _InstallableTargetInstallPath function.
output_prefix += 'lib.target/'
output_file = 'lib' + output_file + '.so.' + get_version()
output_file = 'lib' + output_file + '.' + variables.get('shlib_suffix')
# GYP will output to lib.target except on OS X, this is hardcoded
# in its source - see the _InstallableTargetInstallPath function.
if sys.platform != 'darwin':
output_prefix += 'lib.target/'

action([output_prefix + output_file], 'bin/' + output_file)

Expand Down