opencv4nodejs
Advanced tools
Comparing version 1.4.2 to 1.4.3
@@ -31,7 +31,8 @@ const fs = require('fs'); | ||
const libSuffixOSX = '.dylib'; | ||
const libSuffix = process.platform === 'win32' ? '.lib' : '.so'; | ||
const defaultDir = '/usr/local'; | ||
const opencvDir = resolvePath(process.env.OPENCV_DIR); | ||
let includeDir = resolvePath(process.env.OPENCV_INCLUDE_DIR); | ||
const libSuffix = process.platform === 'win32' ? '.lib' : '.so'; | ||
let libDir = resolvePath(process.env.OPENCV_LIB_DIR); | ||
@@ -80,4 +81,13 @@ | ||
if (err) throw(err); | ||
const libsInDir = files.filter(f => f.includes(libSuffix)); | ||
let libsInDir = files.filter(f => f.includes(libSuffix)); | ||
// quickfix for libs on OSX | ||
if (!libsInDir.length) { | ||
libsInDir = files.filter(f => f.includes(libSuffixOSX)); | ||
} | ||
if (!libsInDir.length) { | ||
throw new Error(`no valid .so, .lib or .dylib files found in in OPENCV_LIB_DIR ('${libDir}')`); | ||
} | ||
// if modules bundled in single lib file | ||
@@ -92,6 +102,2 @@ const world = libsInDir.find(file => file.includes('world')); | ||
if (!libsInDir.length) { | ||
throw new Error(`no valid '${libSuffix}' files found in in OPENCV_LIB_DIR ('${libDir}')`); | ||
} | ||
const libs = []; | ||
@@ -98,0 +104,0 @@ modules.forEach(m => { |
{ | ||
"name": "opencv4nodejs", | ||
"version": "1.4.2", | ||
"version": "1.4.3", | ||
"description": "Transparent OpenCV API for nodejs.", | ||
@@ -5,0 +5,0 @@ "keywords": [ |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
10008245
138