This repository was archived by the owner on Oct 18, 2023. It is now read-only.
File tree Expand file tree Collapse file tree 2 files changed +6
-10
lines changed Expand file tree Collapse file tree 2 files changed +6
-10
lines changed Original file line number Diff line number Diff line change 1
1
const path = require ( 'path' ) ;
2
- const opencvBuild = require ( `@nut-tree/opencv-build-${ process . platform } ` ) ;
3
2
const { resolvePath } = require ( './commons' ) ;
4
3
5
- // ensure binaries are added to path on windows
6
- if ( process . platform === 'win32' ) {
7
- // append opencv binary path to node process
8
- if ( ! process . env . path . includes ( opencvBuild . opencvBinDir ) ) {
9
- process . env . path = `${ process . env . path } ;${ opencvBuild . opencvBinDir } ;`
10
- }
11
- }
12
-
13
4
let cv ;
14
5
if ( process . env . BINDINGS_DEBUG ) {
15
6
cv = require ( path . join ( __dirname , '../build/Debug/opencv4nodejs' ) ) ;
Original file line number Diff line number Diff line change @@ -26,5 +26,10 @@ if (process.platform === 'win32') {
26
26
}
27
27
28
28
// if not windows, link libs dynamically
29
- console . log ( `-L.. ` ) ;
29
+ console . log ( `-L<(PRODUCT_DIR) ` ) ;
30
30
opencvBuild . opencvModules . filter ( lib => desiredModules . includes ( lib ) ) . forEach ( lib => console . log ( `-lopencv_${ lib } ` ) ) ;
31
+ if ( process . env . BINDINGS_DEBUG ) {
32
+ console . log ( '-Wl,-rpath,../build/Debug/opencv4nodejs' ) ;
33
+ } else {
34
+ console . log ( '-Wl,-rpath,../build/Release/opencv4nodejs' ) ;
35
+ }
You can’t perform that action at this time.
0 commit comments