Skip to content

Commit 494dba5

Browse files
committed
Trying to solve rpath problem with node_port respect to metacall distributable.
1 parent 892f5e3 commit 494dba5

File tree

2 files changed

+8
-10
lines changed

2 files changed

+8
-10
lines changed

source/ports/node_port/CMakeLists.txt

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -229,10 +229,10 @@ target_link_libraries(${target}
229229

230230
# Library
231231
install(TARGETS ${target}
232-
EXPORT "${target}-export" COMPONENT dev
233-
RUNTIME DESTINATION ${INSTALL_BIN}/node_modules/metacall COMPONENT runtime
234-
LIBRARY DESTINATION ${INSTALL_SHARED}/node_modules/metacall COMPONENT runtime
235-
ARCHIVE DESTINATION ${INSTALL_LIB}/node_modules/metacall COMPONENT dev
232+
EXPORT "${target}-export" COMPONENT dev
233+
RUNTIME DESTINATION ${INSTALL_BIN} COMPONENT runtime
234+
LIBRARY DESTINATION ${INSTALL_SHARED} COMPONENT runtime
235+
ARCHIVE DESTINATION ${INSTALL_LIB} COMPONENT dev
236236
)
237237

238238
# Files

source/ports/node_port/index.js

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -29,14 +29,14 @@ const addon = (() => {
2929
*/
3030

3131
/* Load addon */
32-
const addon = (() => {
32+
return (() => {
3333
for (let path of paths) {
3434
for (let name of names) {
3535
try {
36-
const addon = require(Path.join(path, `${name}.node`));
36+
const port = require(Path.join(path, `${name}.node`));
3737

38-
if (addon) {
39-
return addon;
38+
if (port) {
39+
return port;
4040
}
4141
} catch (e) {
4242
if (e.code !== 'MODULE_NOT_FOUND') {
@@ -46,8 +46,6 @@ const addon = (() => {
4646
}
4747
}
4848
})();
49-
50-
return addon;
5149
})();
5250

5351
const node_require = Module.require;

0 commit comments

Comments
 (0)