mirror of
https://github.com/peterbraden/node-opencv.git
synced 2025-12-08 19:45:55 +00:00
Fix install script
This commit is contained in:
parent
58f248af12
commit
aaece6921d
@ -13,8 +13,7 @@ cool, I'd love to hear about it!
|
||||
|
||||
## Install
|
||||
|
||||
You'll need OpenCV 2.3.1 or newer installed before installing node-opencv. Note
|
||||
that OpenCV 3.x is not yet fully supported.
|
||||
You'll need OpenCV 2.3.1 or newer installed before installing node-opencv.
|
||||
|
||||
## Specific for macOS
|
||||
Install OpenCV using brew
|
||||
|
||||
@ -8,6 +8,7 @@ namespace cv {
|
||||
using cv::face::FaceRecognizer;
|
||||
}
|
||||
#else
|
||||
#warning using opencv2 contrib
|
||||
#include "opencv2/contrib/contrib.hpp"
|
||||
#endif
|
||||
|
||||
|
||||
@ -2,7 +2,14 @@
|
||||
|
||||
var exec = require("child_process").exec;
|
||||
var fs = require("fs");
|
||||
var flag = "--exists";
|
||||
|
||||
var flags = {
|
||||
'--cflags' : '--cflags',
|
||||
'--libs' : '--libs'
|
||||
}
|
||||
var flag = flags[process.argv[2]] || '--exists'
|
||||
|
||||
|
||||
|
||||
// Normally |pkg-config opencv ...| could report either OpenCV 2.x or OpenCV 3.y
|
||||
// depending on what is installed. To enable both 2.x and 3.y to co-exist on
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user