-
Notifications
You must be signed in to change notification settings - Fork 254
/
CMakeLists.txt
248 lines (223 loc) · 6.19 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
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
project(ODAS)
cmake_minimum_required(VERSION 2.4.6..3.16)
if(COMMAND cmake_policy)
cmake_policy(SET CMP0003 NEW)
endif(COMMAND cmake_policy)
option(ODAS_INSTALL_EXECUTABLES "Install the odaslive and odasserver executables along with the odas library" OFF)
option(ODAS_FORCE_BIN_AND_LIB_DIRS "Force the installation of the odas library and executables in the bin and lib directories" ON)
option(ODAS_DISABLE_INSTALL "Disable the installation of the odas library and executables" OFF)
find_package(PkgConfig REQUIRED)
pkg_check_modules(PC_FFTW3 REQUIRED fftw3f)
pkg_check_modules(PC_ALSA REQUIRED alsa)
pkg_check_modules(PC_LIBCONFIG REQUIRED libconfig)
pkg_check_modules(PC_PULSEAUDIO REQUIRED libpulse-simple)
include_directories("${PROJECT_SOURCE_DIR}/include")
# Compile in release mode if not set
if(NOT CMAKE_BUILD_TYPE)
SET(CMAKE_BUILD_TYPE "Release")
endif(NOT CMAKE_BUILD_TYPE)
if(ODAS_FORCE_BIN_AND_LIB_DIRS)
set(CMAKE_RUNTIME_OUTPUT_DIRECTORY "${PROJECT_BINARY_DIR}/bin")
set(CMAKE_LIBRARY_OUTPUT_DIRECTORY "${PROJECT_BINARY_DIR}/lib")
endif()
#Add base directory for includes (global)
include_directories(include/odas)
set(SRC
src/general/format.c
src/general/interface.c
src/general/link.c
src/general/mic.c
src/general/samplerate.c
src/general/soundspeed.c
src/general/spatialfilter.c
src/general/thread.c
src/init/combining.c
src/init/delay.c
src/init/directivity.c
src/init/hit.c
src/init/linking.c
src/init/scanning.c
src/init/space.c
src/init/windowing.c
src/signal/acorr.c
src/signal/aimg.c
src/signal/area.c
src/signal/assignation.c
src/signal/beampattern.c
src/signal/category.c
src/signal/coherence.c
src/signal/delta.c
src/signal/demixing.c
src/signal/env.c
src/signal/frame.c
src/signal/freq.c
src/signal/gain.c
src/signal/hop.c
src/signal/index.c
src/signal/kalman.c
src/signal/map.c
src/signal/mask.c
src/signal/mixture.c
src/signal/pair.c
src/signal/particle.c
src/signal/pitch.c
src/signal/point.c
src/signal/postprob.c
src/signal/pot.c
src/signal/scan.c
src/signal/spatialgain.c
src/signal/spatialindex.c
src/signal/spatialmask.c
src/signal/steer.c
src/signal/target.c
src/signal/tau.c
src/signal/tdoa.c
src/signal/track.c
src/signal/triangle.c
src/signal/window.c
src/signal/xcorr.c
src/system/acorr2pitch.c
src/system/demixing2env.c
src/system/demixing2freq.c
src/system/env2env.c
src/system/hop2hop.c
src/system/hop2frame.c
src/system/frame2freq.c
src/system/freq2acorr.c
src/system/freq2env.c
src/system/freq2freq.c
src/system/freq2frame.c
src/system/freq2xcorr.c
src/system/frame2hop.c
src/system/gain2mask.c
src/system/kalman2coherence.c
src/system/kalman2kalman.c
src/system/mixture2mixture.c
src/system/particle2coherence.c
src/system/particle2particle.c
src/system/pitch2category.c
src/system/steer2demixing.c
src/system/track2gain.c
src/system/track2steer.c
src/system/xcorr2aimg.c
src/system/xcorr2xcorr.c
src/utils/cmatrix.c
src/utils/fft.c
src/utils/fifo.c
src/utils/gaussian.c
src/utils/gaussjordan.c
src/utils/inverse.c
src/utils/matrix.c
src/utils/pcm.c
src/utils/random.c
src/utils/transcendental.c
src/aconnector/acon_categories.c
src/aconnector/acon_hops.c
src/aconnector/acon_pots.c
src/aconnector/acon_powers.c
src/aconnector/acon_spectra.c
src/aconnector/acon_targets.c
src/aconnector/acon_tracks.c
src/ainjector/ainj_targets.c
src/amessage/amsg_categories.c
src/amessage/amsg_hops.c
src/amessage/amsg_pots.c
src/amessage/amsg_powers.c
src/amessage/amsg_spectra.c
src/amessage/amsg_targets.c
src/amessage/amsg_tracks.c
src/amodule/amod_classify.c
src/amodule/amod_istft.c
src/amodule/amod_mapping.c
src/amodule/amod_noise.c
src/amodule/amod_resample.c
src/amodule/amod_ssl.c
src/amodule/amod_sss.c
src/amodule/amod_sst.c
src/amodule/amod_stft.c
src/amodule/amod_volume.c
src/asink/asnk_categories.c
src/asink/asnk_hops.c
src/asink/asnk_pots.c
src/asink/asnk_powers.c
src/asink/asnk_spectra.c
src/asink/asnk_tracks.c
src/asource/asrc_hops.c
src/connector/con_categories.c
src/connector/con_hops.c
src/connector/con_pots.c
src/connector/con_powers.c
src/connector/con_spectra.c
src/connector/con_targets.c
src/connector/con_tracks.c
src/injector/inj_targets.c
src/message/msg_categories.c
src/message/msg_hops.c
src/message/msg_pots.c
src/message/msg_powers.c
src/message/msg_spectra.c
src/message/msg_targets.c
src/message/msg_tracks.c
src/module/mod_classify.c
src/module/mod_istft.c
src/module/mod_mapping.c
src/module/mod_noise.c
src/module/mod_resample.c
src/module/mod_ssl.c
src/module/mod_sss.c
src/module/mod_sst.c
src/module/mod_stft.c
src/module/mod_volume.c
src/sink/snk_categories.c
src/sink/snk_hops.c
src/sink/snk_pots.c
src/sink/snk_powers.c
src/sink/snk_spectra.c
src/sink/snk_tracks.c
src/source/src_hops.c
)
add_library(odas SHARED
${SRC}
)
target_link_libraries(odas
${PC_FFTW3_LIBRARIES}
${PC_ALSA_LIBRARIES}
${PC_LIBCONFIG_LIBRARIES}
${PC_PULSEAUDIO_LIBRARIES}
m
pthread
)
add_executable(odaslive
demo/odaslive/main.c
demo/odaslive/configs.c
demo/odaslive/objects.c
demo/odaslive/parameters.c
demo/odaslive/profiler.c
demo/odaslive/threads.c
)
target_link_libraries(odaslive
odas
)
add_executable(odasserver
demo/odasserver/main.c
)
target_link_libraries(odasserver
odas
)
if (NOT ODAS_DISABLE_INSTALL)
install(TARGETS odas LIBRARY DESTINATION lib)
install(
DIRECTORY include/
DESTINATION include
FILES_MATCHING
PATTERN "*.h"
)
if(ODAS_INSTALL_EXECUTABLES)
install(TARGETS odaslive DESTINATION bin)
install(TARGETS odasserver DESTINATION bin)
endif()
endif()
if(ODAS_FORCE_BIN_AND_LIB_DIRS)
unset(CMAKE_RUNTIME_OUTPUT_DIRECTORY)
unset(CMAKE_LIBRARY_OUTPUT_DIRECTORY)
endif()