Skip to content

Commit

Permalink
start assuming newly cross-platform shared_library location in node-gyp
Browse files Browse the repository at this point in the history
  • Loading branch information
Dane Springmeyer committed Oct 21, 2021
1 parent fa143c9 commit 6356cc7
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 27 deletions.
31 changes: 6 additions & 25 deletions test/app4/binding.gyp
Expand Up @@ -23,32 +23,13 @@
"dependencies": [ "<(module_name)" ],
"copies": [
{
"files": [ "<(PRODUCT_DIR)/<(module_name).node" ],
"destination": "<(module_path)/"
"files": [ "<(PRODUCT_DIR)/<(module_name).node" ],
"destination": "<(module_path)/"
},
],
'conditions': [
['OS == "win"', {
"copies": [
{
"files": [ "<(PRODUCT_DIR)/mylib<(SHARED_LIB_SUFFIX)" ],
"destination": "<(module_path)/"
}
]
}, {
"copies": [
{
"files": [ "<(PRODUCT_DIR)/mylib<(SHARED_LIB_SUFFIX)" ],
"destination": "<(module_path)/lib.target/"
},
# gyp inside node v16 uses -rpath=$ORIGIN/ instead of -rpath=$ORIGIN/lib.target/
{
"files": [ "<(PRODUCT_DIR)/mylib<(SHARED_LIB_SUFFIX)" ],
"destination": "<(module_path)/"
}
]
}
]
{
"files": [ "<(PRODUCT_DIR)/mylib<(SHARED_LIB_SUFFIX)" ],
"destination": "<(module_path)/"
}
]
}
]
Expand Down
2 changes: 1 addition & 1 deletion test/app4/deps/mylib.gyp
Expand Up @@ -14,7 +14,7 @@
'include_dirs': [ 'include/' ],
},
'xcode_settings': {
'DYLIB_INSTALL_NAME_BASE': '@loader_path/lib.target/',
'DYLIB_INSTALL_NAME_BASE': '@loader_path',
"MACOSX_DEPLOYMENT_TARGET":"10.9",
"CLANG_CXX_LIBRARY": "libc++"
}
Expand Down
2 changes: 1 addition & 1 deletion test/build.test.js
Expand Up @@ -52,7 +52,7 @@ const apps = [
'name': 'app4',
'args': '',
'files': {
'base': [[localVer, 'app4.node'].join('/'), [localVer, 'lib.target', 'mylib.' + SOEXT].join('/')]
'base': [[localVer, 'app4.node'].join('/'), [localVer, 'mylib.' + SOEXT].join('/')]
}
},
{
Expand Down

0 comments on commit 6356cc7

Please sign in to comment.