Fix install script

This commit is contained in:
Peter Braden 2019-03-20 09:36:36 +00:00
parent 58f248af12
commit aaece6921d
3 changed files with 10 additions and 3 deletions

View File

@ -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

View File

@ -8,6 +8,7 @@ namespace cv {
using cv::face::FaceRecognizer;
}
#else
#warning using opencv2 contrib
#include "opencv2/contrib/contrib.hpp"
#endif

View File

@ -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