-
Notifications
You must be signed in to change notification settings - Fork 98
/
config.w32
57 lines (43 loc) · 2.51 KB
/
config.w32
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
// $Id$
// vim:ft=javascript
ARG_WITH("opencv", "for opencv support", "no");
// Otherwise, use ARG_ENABLE
// ARG_ENABLE("opencv", "enable opencv support", "no");
//当使用--with-opencv或--enable-opencv的时候PHP_OPENCV为yes,否则为no
if (PHP_OPENCV != "no") {
ADD_FLAG("CFLAGS_OPENCV", "/EHcs");
ADD_FLAG("CFLAGS_OPENCV", "/D _ALLOW_KEYWORD_MACROS");
ADD_FLAG("CFLAGS_OPENCV", "/D __STDC_LIMIT_MACROS");
//检查opencv链接库,如果存在返回路径
CHECK_LIB("opencv_world400d.lib;opencv_world400.lib", "opencv","D:\\opencv\\build\\x64\\vc15\\lib");
CHECK_HEADER_ADD_INCLUDE("opencv2\\opencv.hpp", "CFLAGS_OPENCV", "D:\\opencv\\build\\include");
opencv_source_file="opencv.cc \
opencv_exception.cc \
source\\opencv2\\core\\hal\\opencv_interface.cc \
source\\opencv2\\core\\opencv_base.cc \
source\\opencv2\\core\\opencv_cvdef.cc \
source\\opencv2\\core\\opencv_type.cc \
source\\opencv2\\core\\opencv_utility.cc \
source\\opencv2\\core\\opencv_persistence.cc \
source\\opencv2\\core\\opencv_mat.cc \
source\\opencv2\\face\\opencv_facerec.cc \
source\\opencv2\\opencv_face.cc \
source\\opencv2\\opencv_core.cc \
source\\opencv2\\opencv_highgui.cc \
source\\opencv2\\opencv_imgcodecs.cc \
source\\opencv2\\opencv_imgproc.cc \
source\\opencv2\\opencv_ml.cc \
source\\opencv2\\opencv_objdetect.cc \
source\\opencv2\\opencv_videoio.cc"
EXTENSION("opencv", opencv_source_file,"yes");
//使用ADD_SOURCES方式也可以
//ADD_SOURCES(configure_module_dirname + "/source/opencv2/core/hal","opencv_interface.cc","opencv");
//ADD_SOURCES(configure_module_dirname + "/source/opencv2/core","opencv_base.cc opencv_cvdef.cc","opencv");
//ADD_SOURCES(configure_module_dirname + "/source/opencv2/core","opencv_base.cc opencv_cvdef.cc opencv_mat.cc opencv_persistence.cc \
//opencv_type.cc opencv_utility.cc");
//ADD_SOURCES(configure_module_dirname + "/source/opencv2/face","opencv_facerec.cc");
//ADD_SOURCES(configure_module_dirname + "/source/opencv2","opencv_core.cc opencv_face.cc opencv_highgui.cc opencv_imgcodecs.cc \
//opencv_imgproc.cc opencv_ml.cc opencv_objdetect.cc opencv_videoio.cc");
//防止编译链接问题
ADD_FLAG("CFLAGS_OPENCV", "/D ZEND_WIN32_KEEP_INLINE=1 /U ZEND_WIN32_FORCE_INLINE");
}