-
Notifications
You must be signed in to change notification settings - Fork 0
/
MakeAndUse
114 lines (89 loc) · 3.13 KB
/
MakeAndUse
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
*********************************************************************************
* *
* Opencv install (3.0) *
* *
*********************************************************************************
GCC 4.4.x or later. This can be installed with:
CMake 2.6 or higher;
Git;
GTK+2.x or higher, including headers (libgtk2.0-dev);
pkgconfig;
Python 2.6 or later and Numpy 1.5 or later with developer packages (python-dev, python-numpy);
ffmpeg or libav development packages: libavcodec-dev, libavformat-dev, libswscale-dev;
cd WorkingDirectory
git clone https://github.com/Itseez/opencv.git
cd opencv
cmake
make
sudo make install
*********************************************************************************
* *
* nodejs install *
* *
*********************************************************************************
sudo apt-get nodejs
*********************************************************************************
* *
* npm install *
* *
*********************************************************************************
sudo apt-get npm
*********************************************************************************
* *
* npm gyp module (link between C++ and nodejs) *
* *
*********************************************************************************
sudo npm install -g node-gyp
*********************************************************************************
* *
* npm ardrone module *
* *
*********************************************************************************
npm install git://github.com/felixge/node-ar-drone.git
or
npm install ar-drone
*********************************************************************************
* *
* Build *
* *
*********************************************************************************
Create a directory
Put ProjectARDrone.cpp, binding.gyp, ProjectARDrone.js in the directory
Open console and go to the directory (cd /......)
node-gyp configure
node-gyp build
*********************************************************************************
* *
* Run *
* *
*********************************************************************************
node ProjectARDrone.js
*********************************************************************************
* *
* Add new Dependencies *
* *
*********************************************************************************
Go to the binding.gyp
{
"targets" : [
{
"target_name": "ProjectARDrone",
"sources": [""ProjectARDrone.cpp"],
"include_dirs": [Add include directory path here],
"libraries": [Add library name with path here]
}
]
}
exemple: want add library opencv_core from opencv
library is libopencv_core.so, include is in "/usr/local/include/opencv",
library is in "/usr/local/lib"
{
"targets" : [
{
"target_name": "ProjectARDrone",
"sources": [""ProjectARDrone.cpp"],
"include_dirs": ["/usr/local/include/opencv"],
"libraries": ["/usr/local/lib/libopencv_core.so"]
}
]
}