opencv4nodejs
Advanced tools
Comparing version 1.4.3 to 1.4.4
@@ -31,2 +31,3 @@ const fs = require('fs'); | ||
const libPrefixOSX = 'libopencv_'; | ||
const libSuffixOSX = '.dylib'; | ||
@@ -81,10 +82,5 @@ const libSuffix = process.platform === 'win32' ? '.lib' : '.so'; | ||
if (err) throw(err); | ||
let libsInDir = files.filter(f => f.includes(libSuffix)); | ||
let libsInDir = files.filter(f => f.includes(libSuffix) || f.includes(libSuffixOSX)); | ||
// 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}')`); | ||
@@ -104,3 +100,4 @@ } | ||
modules.forEach(m => { | ||
const lib = libsInDir.find(file => file.includes(m)); | ||
let lib = libsInDir.find(file => file.includes(m) || file.includes(libPrefixOSX + m)); | ||
if (!lib) { | ||
@@ -107,0 +104,0 @@ throw new Error(`lib for module '${m}' not found in OPENCV_LIB_DIR ('${libDir}')`); |
{ | ||
"name": "opencv4nodejs", | ||
"version": "1.4.3", | ||
"version": "1.4.4", | ||
"description": "Transparent OpenCV API for nodejs.", | ||
@@ -5,0 +5,0 @@ "keywords": [ |
Sorry, the diff of this file is not supported yet
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
10008409
135