Permalink
Browse files

WIP on moving to gyp

  • Loading branch information...
1 parent 1adb840 commit 5c1243329ded1760f7cf464818dd4597f20b02e4 @peterbraden committed Jul 5, 2012
Showing with 12 additions and 38 deletions.
  1. +1 −1 README.md
  2. +8 −5 binding.gyp
  3. +1 −1 build.sh
  4. +1 −1 package.json
  5. +1 −1 smoke.sh
  6. +0 −4 src/OpenCV.h
  7. +0 −25 wscript
View
@@ -18,7 +18,7 @@ Then:
Or to build the repo:
- node-waf configure && node-waf build
+ node-gyp rebuild
## Examples
View
@@ -1,14 +1,17 @@
{
"targets": [{
- "target_name": "opencv"
+ "target_name": "opencv"
, "sources": [
- "src/CascadeClassifierWrap.cc"
- , "src/init.cc"
+ "src/init.cc"
, "src/Matrix.cc"
, "src/OpenCV.cc"
+ , "src/CascadeClassifierWrap.cc"
, "src/Point.cc"
- , "src/VideoCaptureWrap.cc" ]
+ , "src/VideoCaptureWrap.cc"
+ ]
+ , "cflags" : ["-O3", "-Wall", "<!@(pkg-config --cflags opencv]"]
+ , "libraries" : ["<!@(pkg-config --libs opencv)"]
+
}]
- , "libraries": ['-l/lib/opencv.lib' ]
}
View
@@ -1,6 +1,6 @@
#!/bin/bash
-node-waf configure build &&
+node-gyp rebuild &&
cd examples &&
#node face_detection.js
node $1
View
@@ -15,7 +15,7 @@
}
, "engine": "node >= 0.4.1"
, "scripts": {
- "preinstall": "node-waf configure build"
+ "preinstall": "node-gyp rebuild"
, "test": "node test/unit.js"
}
, "main": "./lib/opencv"
View
@@ -1,5 +1,5 @@
#!/bin/bash
-node-waf configure && node-waf -v build && echo '-- Compiled OK --
+node-gyp -d rebuild && echo '-- Compiled OK --
' && node smoketest.js && echo '-- Smoke Done, running tests --
View
@@ -1,10 +1,6 @@
#ifndef __NODE_OPENCV_H__
#define __NODE_OPENCV_H__
-#ifdef __cplusplus
- #import "opencv2/opencv.hpp"
-#endif
-
#include <v8.h>
#include <node.h>
#include <node_object_wrap.h>
View
25 wscript
@@ -1,25 +0,0 @@
-def set_options(opt):
- opt.tool_options("compiler_cxx")
-
-
-def configure(conf):
- conf.check_tool('compiler_cxx')
- conf.check_tool('node_addon')
- conf.check_cfg(package='opencv',
- atleast_version='2.3.1',
- libpath=[
- '/lib', '/usr/lib', '/usr/local/lib','/usr/local/include',
- '/opt/local/include', '/opt/local/lib'],
- args='--cflags --libs',
- uselib_store='OPENCV',
- mandatory=True)
-
-
-def build(bld):
- obj = bld.new_task_gen("cxx", "shlib", "node_addon")
- obj.cxxflags = ["-g", "-D_FILE_OFFSET_BITS=64", "-D_LARGEFILE_SOURCE", "-Wall"]
- # This is the name of our extension.
- obj.target = "opencv"
- obj.source = bld.glob('src/*.cc')
- obj.uselib = ['OPENCV']
-

0 comments on commit 5c12433

Please sign in to comment.