-
Notifications
You must be signed in to change notification settings - Fork 11
/
Copy pathCMakeLists.txt
219 lines (151 loc) · 5.07 KB
/
CMakeLists.txt
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
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
project( RGBDAcquisitionProject )
cmake_minimum_required( VERSION 2.8.7 )
set(CMAKE_MODULE_PATH ${CMAKE_SOURCE_DIR}/3dparty ${CMAKE_MODULE_PATH})
OPTION (COMPILE_FOR_PERFORMANCE OFF)
OPTION (ENABLE_AMMARSERVER OFF)
OPTION (ENABLE_FACEDETECTION_DEV OFF)
OPTION (ENABLE_FREENECT ON)
OPTION (ENABLE_FREENECT2 ON)
OPTION (ENABLE_REALSENSE ON)
OPTION (ENABLE_TEMPLATE ON)
OPTION (ENABLE_DESKTOP ON)
OPTION (ENABLE_V4L2 ON)
OPTION (ENABLE_CUDA OFF)
OPTION (ENABLE_OPENNI1 OFF)
OPTION (ENABLE_OPENNI2 ON)
OPTION (ENABLE_DEPTHSENSE OFF)
OPTION (ENABLE_NITE2 OFF)
OPTION (ENABLE_OPENGL ON)
OPTION (ENABLE_NETWORK ON)
OPTION (ENABLE_EDITOR ON)
OPTION (ENABLE_LOCATION_SERVICE OFF)
OPTION (ENABLE_TESTS OFF)
OPTION (ENABLE_AUTOSENSING ON)
OPTION (ENABLE_OPENCV OFF)
OPTION (ENABLE_OPENCV_BASED_TOOLS OFF)
OPTION (ENABLE_OPENCV_BINDINGS OFF)
OPTION (ENABLE_PROCESSOR_BODYTRACKER OFF)
OPTION (ENABLE_PROCESSOR_DARKNET OFF)
OPTION (ENABLE_PROCESSOR_MOVIDIUS OFF)
set(CMAKE_CXX_FLAGS "-fPIC -s")
set(CMAKE_C_FLAGS "-fPIC -s")
IF( COMPILE_FOR_PERFORMANCE )
#-march=native -mtune=native
set(CMAKE_CXX_FLAGS "-fPIC -O3 -fexpensive-optimizations -s")
set(CMAKE_C_FLAGS "-fPIC -O3 -fexpensive-optimizations -s")
ENDIF( COMPILE_FOR_PERFORMANCE )
IF( ENABLE_AUTOSENSING )
#----
IF( ENABLE_OPENCV )
MESSAGE("Trying to auto-sense OpenCV presence .. ")
find_package(OpenCV)
ENDIF( ENABLE_OPENCV )
if (OpenCV_FOUND)
OPTION (ENABLE_OPENCV ON)
OPTION (ENABLE_OPENCV_BASED_TOOLS ON)
ELSE (OpenCV_FOUND)
OPTION (ENABLE_OPENCV OFF)
OPTION (ENABLE_OPENCV_BASED_TOOLS OFF)
MESSAGE("OpenCV Not found , some parts like viewer etc will not be compiled")
ENDIF(OpenCV_FOUND)
#----
ENDIF( ENABLE_AUTOSENSING )
OPTION (ENABLE_JPG OFF)
OPTION (ENABLE_PNG OFF)
add_subdirectory (3dparty/fast)
IF( ENABLE_CUDA )
add_subdirectory (gpuCompare/)
ENDIF( ENABLE_CUDA )
IF( ENABLE_AMMARSERVER )
#add_subdirectory (3dparty/AmmarServer/src/AmmServerlib)
add_subdirectory (3dparty/AmmarServer/)
add_definitions(-DUSE_AMMARSERVER)
ENDIF( ENABLE_AMMARSERVER )
if (ENABLE_FREENECT2)
add_subdirectory (3dparty/librealsense)
ELSE (ENABLE_FREENECT2)
#OPTION (ENABLE_OPENCV OFF)
MESSAGE("Freenect2 not found , some parts will not be compiled")
ENDIF(ENABLE_FREENECT2)
if (ENABLE_REALSENSE)
add_definitions(-DBUILD_REALSENSE)
#add_subdirectory (3dparty/libfreenect2/examples/protonect)
add_subdirectory (librealsense_acquisition_shared_library)
ELSE (ENABLE_REALSENSE)
MESSAGE("Realsense support will not be compiled")
ENDIF(ENABLE_REALSENSE)
#First to make our handy tools
add_subdirectory (tools/)
#Then make our handy processor plugins
add_subdirectory (processors/)
#This is the core library
add_subdirectory (acquisition/)
add_subdirectory (acquisitionSegment/)
add_subdirectory (acquisition_mux/)
#This is the core application
add_subdirectory (grabber/)
add_subdirectory (grabber_mux/)
add_subdirectory (grabber_segment/)
#Acquisition Plugins
IF( ENABLE_TEMPLATE )
add_subdirectory (template_acquisition_shared_library/)
ENDIF( ENABLE_TEMPLATE )
IF( ENABLE_OPENGL )
add_subdirectory (opengl_acquisition_shared_library/)
#add_subdirectory (opengl_acquisition_shared_library/opengl_depth_and_color_renderer)
add_definitions(-DUSE_GLEW)
add_subdirectory (viewerOGL/)
ENDIF( ENABLE_OPENGL )
IF( ENABLE_V4L2 )
add_subdirectory (v4l2_acquisition_shared_library/)
add_subdirectory (v4l2stereo_acquisition_shared_library/)
ENDIF( ENABLE_V4L2 )
IF( ENABLE_DESKTOP )
add_subdirectory (3dparty/xwd-1.0.5)
add_subdirectory (desktop_acquisition_shared_library/)
ENDIF( ENABLE_DESKTOP )
IF( ENABLE_NETWORK )
IF( ENABLE_AMMARSERVER )
add_subdirectory (network_acquisition_shared_library/)
ENDIF( ENABLE_AMMARSERVER )
ENDIF( ENABLE_NETWORK )
IF( ENABLE_FREENECT )
add_subdirectory (libfreenect_acquisition_shared_library/)
ENDIF( ENABLE_FREENECT )
IF( ENABLE_FREENECT2 )
add_subdirectory (libfreenect2_acquisition_shared_library/)
ENDIF( ENABLE_FREENECT2 )
IF( ENABLE_OPENNI1 )
add_subdirectory (openni1_acquisition_shared_library/)
ENDIF( ENABLE_OPENNI1 )
IF( ENABLE_OPENNI2 )
add_subdirectory (openni2_acquisition_shared_library/)
ENDIF( ENABLE_OPENNI2 )
IF( ENABLE_DEPTHSENSE )
add_subdirectory (depthsense_acquisition_shared_library/)
ENDIF( ENABLE_DEPTHSENSE )
#Composite ( bloated ;p ) parts
IF( ENABLE_EDITOR )
FIND_PACKAGE(wxWidgets)
IF(wxWidgets_FOUND)
add_subdirectory (editor/)
ELSE(wxWidgets_FOUND)
MESSAGE("wxWidgets not found , cannot build editor!")
ENDIF(wxWidgets_FOUND)
ENDIF( ENABLE_EDITOR )
IF( ENABLE_TESTS )
add_subdirectory (tests/)
ENDIF( ENABLE_TESTS )
IF( ENABLE_OPENCV )
add_subdirectory (viewer/)
IF( ENABLE_OPENCV_BINDINGS )
add_subdirectory (3dparty/OpenCVBindings)
ENDIF( ENABLE_OPENCV_BINDINGS )
ELSE (ENABLE_OPENCV)
MESSAGE("Viewer will not be compiled , OpenCV stuff missing? ( check ENABLE_OPENCV flag )..")
ENDIF( ENABLE_OPENCV )
# TODO FIX INSTALLATION DIRECTORIES
# install(TARGETS RGBDAcquisitionProject
# LIBRARY DESTINATION lib
# ARCHIVE DESTINATION lib
# RUNTIME DESTINATION bin)