CMakeLists.txt 17.2 KB
Newer Older
Jonas Stienen's avatar
Jonas Stienen committed
1 2 3 4 5 6 7
cmake_minimum_required( VERSION 2.8 )
project( VACore )

list( APPEND CMAKE_MODULE_PATH "$ENV{VISTA_CMAKE_COMMON}" )

include( VistaCommon )

8

9 10
if( NOT DEFINED ITA_VACORE_WITH_TESTS )
	set( ITA_VACORE_WITH_TESTS OFF CACHE BOOL "Build VACore with tests" )
11
endif( )
12

13 14
if( NOT DEFINED ITA_CORE_LIBS_BUILD_STATIC )
	set( ITA_CORE_LIBS_BUILD_STATIC OFF CACHE BOOL "Build all ITA core libs in static mode" )
15
endif( )
16 17 18

if( NOT DEFINED ITA_VISTA_BUILD_STATIC )
	set( ITA_VISTA_BUILD_STATIC OFF CACHE BOOL "Build against static ViSTA libraries" )
19
endif( )
20 21 22

if( NOT DEFINED ITA_VA_BUILD_STATIC )
	set( ITA_VA_BUILD_STATIC OFF CACHE BOOL "Build static VA libs" )
23 24
endif( )

25 26 27 28 29 30
if( NOT DEFINED ITA_VA_CORE_LIBS_FFT_USES_FFTW3 )
	set( ITA_VA_CORE_LIBS_FFT_USES_FFTW3 ON CACHE BOOL "If ITAFFT library of ITACoreLibs uses FFTW3, VACore has to fall back to GNU GPL license." )
	set( ITA_VA_COPYING_GNU_GPL ON PARENT_SCOPE )
endif( )


31 32 33 34 35 36 37
if( NOT DEFINED ITA_VACORE_DEPLOY_WITH_COMMON_DATA )
	set( ITA_VACORE_DEPLOY_WITH_COMMON_DATA ON CACHE BOOL "Will deploy VACore with common data (HRIR, Directivity, WAV file, HPEQ, Room Model, etc)" )
endif( )

if( NOT DEFINED ITA_VACORE_DEPLOY_WITH_COMMON_CONFIGS )
	set( ITA_VACORE_DEPLOY_WITH_COMMON_CONFIGS ON CACHE BOOL "Will deploy VACore with common configuration files (generic VACore.ini, setups for laboraties)" )
endif( )
38

39 40 41
if( NOT DEFINED ITA_VACORE_DEPLOY_WITH_COMMON_SCRIPTS )
	set( ITA_VACORE_DEPLOY_WITH_COMMON_SCRIPTS ON CACHE BOOL "Will deploy VACore with common scripts (start VAServer from console)" )
endif( )
42

43

44 45
# Required packages
vista_use_package( VistaCoreLibs REQUIRED COMPONENTS VistaInterProcComm FIND_DEPENDENCIES )
Jonas Stienen's avatar
Jonas Stienen committed
46 47
vista_use_package( VABase REQUIRED FIND_DEPENDENCIES )
vista_use_package( ITABase REQUIRED FIND_DEPENDENCIES )
48
vista_use_package( ITADSP REQUIRED FIND_DEPENDENCIES )
Jonas Stienen's avatar
Jonas Stienen committed
49 50 51
vista_use_package( ITADataSources REQUIRED FIND_DEPENDENCIES )
vista_use_package( ITAConvolution REQUIRED FIND_DEPENDENCIES )
vista_use_package( ITASampler REQUIRED FIND_DEPENDENCIES )
Dipl.-Ing. Jonas Stienen's avatar
Dipl.-Ing. Jonas Stienen committed
52
vista_use_package( ITACTC REQUIRED FIND_DEPENDENCIES )
53
vista_use_package( OpenDAFF REQUIRED )
Dipl.-Ing. Jonas Stienen's avatar
Dipl.-Ing. Jonas Stienen committed
54
vista_use_package( SPLINE REQUIRED )
55
vista_use_package( Eigen REQUIRED )
Jonas Stienen's avatar
Jonas Stienen committed
56

57 58
# Optional packages
vista_find_package( RavenNet QUIET )
59

60 61 62 63
if( ITA_VA_CORE_LIBS_FFT_USES_FFTW3 )
	set( ITA_VA_COPYING_GNU_GPL ON PARENT_SCOPE )
endif( )

64
if( NOT DEFINED ITA_VACORE_VERSION_MAJOR )
65
	set( ITA_VACORE_VERSION_MAJOR "v2019" CACHE STRING "VACore version major (usually 'v' and year)" )
66
endif( )
67
if( NOT DEFINED ITA_VACORE_VERSION_MINOR )
68
	set( ITA_VACORE_VERSION_MINOR "a" CACHE STRING "VACore version minor (usually a,b,c ...)" )
69
endif( )
70 71 72

# Settings

73
if( NOT DEFINED ITA_VACORE_DEFAULT_CONFIG_FILE_NAME )
74
	set( ITA_VACORE_DEFAULT_CONFIG_FILE_NAME VACore.ini CACHE STRING "Default VACore configuration file name (INI file)" )
75
endif( )
76 77


78 79
if( NOT DEFINED ITA_VACORE_DEFAULT_DEBUG_LEVEL )
	set( ITA_VACORE_DEFAULT_DEBUG_LEVEL 3 CACHE INT "Default VACore debug level (0-5)" )
80
endif( )
81 82
if( NOT DEFINED ITA_VACORE_MODULE_INTERFACE_ENABLED )
	set( ITA_VACORE_MODULE_INTERFACE_ENABLED ON CACHE BOOL "Build VACore with module interface" )
83
endif( )
84 85
if( NOT DEFINED ITA_VACORE_NO_MODULE_INTERFACE_THROW_EXCEPTION )
	set( ITA_VACORE_NO_MODULE_INTERFACE_THROW_EXCEPTION ON CACHE BOOL "Throw exception during module call attempt if VACore was build without module interface" )
86
endif( )
87 88
if( NOT DEFINED ITA_VACORE_EVENTS_ENABLED )
	set( ITA_VACORE_EVENTS_ENABLED ON CACHE BOOL "VACore event handling" )
89
endif( )
90

91 92
if( NOT DEFINED ITA_VACORE_MAX_NUM_SOUND_SOURCES )
	set( ITA_VACORE_MAX_NUM_SOUND_SOURCES 0 CACHE INT "VACore maximum number of sound sources ( 0 = unlimited )" )
93
endif( )
94 95
if( NOT DEFINED ITA_VACORE_MAX_NUM_SOUND_RECEIVERS )
	set( ITA_VACORE_MAX_NUM_SOUND_RECEIVERS 0 CACHE INT "VACore maximum number of sound receivers ( 0 = unlimited )" )
96
endif( )
97 98 99
if( NOT DEFINED ITA_VACORE_WITH_TTS_SIGNAL_SOURCE )
	set( ITA_VACORE_WITH_TTS_SIGNAL_SOURCE ${TTSReleay} CACHE BOOL "VACore with text-to-speech signal source support" )
endif( )
100 101


102 103 104
# Data dirs
if( NOT DEFINED ITA_VACORE_BIG_DATA_DIR )
	set( ITA_VACORE_BIG_DATA_DIR "" CACHE PATH "VACore big data dir with more files for auralization (will be added to search path)" )
105
endif( )
106

107 108
if( NOT DEFINED INSIDE_SCENE_DATA )
	set( INSIDE_SCENE_DATA "" CACHE PATH "InsideSceneData folder for Inside scenes" )
109
endif( )
110

111 112 113 114
if( NOT DEFINED ITA_RAVEN_DATA_PATH )
	set( ITA_RAVEN_DATA_PATH "" CACHE PATH "RAVEN data base path (where to find models, HRTFs, materials etc. ...)" )
endif( )

115

116 117 118 119 120 121 122
# drivers
if( NOT DEFINED ITA_VACORE_WITH_AUDIO_BACKEND_ASIO )
	set( ITA_VACORE_WITH_AUDIO_BACKEND_ASIO ON CACHE BOOL "Build VACore with ASIO audio backend support" )
endif( )
if( NOT DEFINED ITA_VACORE_WITH_AUDIO_BACKEND_PORTAUDIO )
	set( ITA_VACORE_WITH_AUDIO_BACKEND_PORTAUDIO ON CACHE BOOL "Build VACore with Portaudio audio backend support" )
endif( )
123
if( NOT DEFINED ITA_VACORE_WITH_AUDIO_BACKEND_VIRTUAL )
124
	set( ITA_VACORE_WITH_AUDIO_BACKEND_VIRTUAL ON CACHE BOOL "Build VACore with virtual audio backend support (for offline simulations)" )
125 126 127
endif( )


128 129
# Development
if( NOT DEFINED ITA_VACORE_REPRODUCTION_NCTC_WITH_SWEET_SPOT_WIDENING )
130
	set( ITA_VACORE_REPRODUCTION_NCTC_WITH_SWEET_SPOT_WIDENING ON CACHE BOOL "Crosstalk-Cancellation sweet spot widening (development)" )
131
endif( )
132

133 134 135 136 137 138


# Rendering modules

if( NOT DEFINED ITA_VACORE_WITH_RENDERER_AMBIENT_MIXER )
	set( ITA_VACORE_WITH_RENDERER_AMBIENT_MIXER ON CACHE BOOL "Build VACore with rendering module: ambient mixer" )
139
endif( )
140

141 142
if( NOT DEFINED ITA_VACORE_WITH_RENDERER_AMBISONICS_FREE_FIELD )
	set( ITA_VACORE_WITH_RENDERER_AMBISONICS_FREE_FIELD ON CACHE BOOL "Build VACore with rendering module: ambisonics free-field" )
143
endif( )
144

145 146
if( NOT DEFINED ITA_VACORE_WITH_RENDERER_BINAURAL_FREE_FIELD )
	set( ITA_VACORE_WITH_RENDERER_BINAURAL_FREE_FIELD ON CACHE BOOL "Build VACore with rendering module: binaural free-field" )
147
endif( )
148 149
if( NOT DEFINED ITA_VACORE_WITH_RENDERER_BINAURAL_ARTIFICIAL_REVERB )
	set( ITA_VACORE_WITH_RENDERER_BINAURAL_ARTIFICIAL_REVERB ON CACHE BOOL "Build VACore with rendering module: artificial reverb" )
150
endif( )
151 152
if( NOT DEFINED ITA_VACORE_WITH_RENDERER_BINAURAL_ROOM_ACOUSTICS )
	set( ITA_VACORE_WITH_RENDERER_BINAURAL_ROOM_ACOUSTICS OFF CACHE BOOL "Build VACore with rendering module: room acoustics (RAVEN)" )
153
endif( )
154 155
if( NOT DEFINED ITA_VACORE_WITH_RENDERER_BINAURAL_AIR_TRAFFIC_NOISE )
	set( ITA_VACORE_WITH_RENDERER_BINAURAL_AIR_TRAFFIC_NOISE ON CACHE BOOL "Build VACore with rendering module: air traffic noise (VATSS)" )
156
endif( )
157 158 159
if( NOT DEFINED ITA_VACORE_WITH_RENDERER_BINAURAL_OUTDOOR_NOISE )
	set( ITA_VACORE_WITH_RENDERER_BINAURAL_OUTDOOR_NOISE OFF CACHE BOOL "Build VACore with rendering module: outdoor noise" )
endif( )
160 161
if( NOT DEFINED ITA_VACORE_WITH_RENDERER_BINAURAL_CLUSTERING )
	set( ITA_VACORE_WITH_RENDERER_BINAURAL_CLUSTERING ON CACHE BOOL "Build VACore with rendering module: clustering renderer" )
162 163
endif( )

164

165 166
if( NOT DEFINED ITA_VACORE_WITH_RENDERER_PROTOTYPE_FREE_FIELD )
	set( ITA_VACORE_WITH_RENDERER_PROTOTYPE_FREE_FIELD ON CACHE BOOL "Build VACore with rendering module: prototype free-field" )
167
endif( )
168 169 170

if( NOT DEFINED ITA_VACORE_WITH_RENDERER_PROTOTYPE_DUMMY )
	set( ITA_VACORE_WITH_RENDERER_PROTOTYPE_DUMMY OFF CACHE BOOL "Build VACore with rendering module: prototype dummy" )
171
endif( )
172 173
if( NOT DEFINED ITA_VACORE_WITH_RENDERER_PROTOTYPE_HEARING_AID )
	set( ITA_VACORE_WITH_RENDERER_PROTOTYPE_HEARING_AID OFF CACHE BOOL "Build VACore with rendering module: prototype hearing aid (iCARE)" )
174
endif( )
175 176
if( NOT DEFINED ITA_VACORE_WITH_RENDERER_PROTOTYPE_GENERIC_PATH )
	set( ITA_VACORE_WITH_RENDERER_PROTOTYPE_GENERIC_PATH ON CACHE BOOL "Build VACore with rendering module: prototype generic path" )
177
endif( )
178 179 180
if( NOT DEFINED ITA_VACORE_WITH_RENDERER_PROTOTYPE_IMAGE_SOURCE )
	set( ITA_VACORE_WITH_RENDERER_PROTOTYPE_IMAGE_SOURCE ON CACHE BOOL "Build VACore with rendering module: prototype image source" )
endif( )
181

182
if( NOT DEFINED ITA_VACORE_WITH_RENDERER_VBAP_FREE_FIELD )
183
	set( ITA_VACORE_WITH_RENDERER_VBAP_FREE_FIELD ON CACHE BOOL "Build VACore with rendering module: vector-base amplitude panning free-field" )
184
endif( )
185 186 187 188 189 190


# Reproduction modules

if( NOT DEFINED ITA_VACORE_WITH_REPRODUCTION_TALKTHROUGH )
	set( ITA_VACORE_WITH_REPRODUCTION_TALKTHROUGH ON CACHE BOOL "Build VACore with reproduction module: talkthrough" )
191
endif( )
192 193
if( NOT DEFINED ITA_VACORE_WITH_REPRODUCTION_HEADPHONES )
	set( ITA_VACORE_WITH_REPRODUCTION_HEADPHONES ON CACHE BOOL "Build VACore with reproduction module: headphones (equalization)" )
194
endif( )
195
if( NOT DEFINED ITA_VACORE_WITH_REPRODUCTION_AMBISONICS )
196
	set( ITA_VACORE_WITH_REPRODUCTION_AMBISONICS OFF CACHE BOOL "Build VACore with reproduction module: ambisonics (B-format decoder)" )
197
endif( )
198 199
if( NOT DEFINED ITA_VACORE_WITH_REPRODUCTION_BINAURAL_NCTC )
	set( ITA_VACORE_WITH_REPRODUCTION_BINAURAL_NCTC ON CACHE BOOL "Build VACore with reproduction module: binaural N-CTC" )
200
endif( )
201
if( NOT DEFINED ITA_VACORE_WITH_REPRODUCTION_BINAURAL_MIXDOWN )
202
	set( ITA_VACORE_WITH_REPRODUCTION_BINAURAL_MIXDOWN OFF CACHE BOOL "Build VACore with reproduction module: binaural mixdown" )
203
endif( )
204
if( NOT DEFINED ITA_VACORE_WITH_REPRODUCTION_AMBISONICS_BINAURAL_MIXDOWN )
205
	set( ITA_VACORE_WITH_REPRODUCTION_AMBISONICS_BINAURAL_MIXDOWN OFF CACHE BOOL "Build VACore with reproduction module: ambisonics binaural mixdown (B-format decoder)" )
206
endif( )
207 208
if( NOT DEFINED ITA_VACORE_WITH_REPRODUCTION_MIXER_LOW_FREQUENCY )
	set( ITA_VACORE_WITH_REPRODUCTION_MIXER_LOW_FREQUENCY ON CACHE BOOL "Build VACore with reproduction module: low frequency (subwoofer) mixer" )
209
endif( )
210

211 212


Jonas Stienen's avatar
Jonas Stienen committed
213 214 215 216 217 218
# Including the source files of all source subfolders recursively
include( "include/_SourceFiles.cmake" )
include( "src/_SourceFiles.cmake" )

include_directories( "include" )

219 220

if( ITA_CORE_LIBS_BUILD_STATIC )
Dipl.-Ing. Jonas Stienen's avatar
Dipl.-Ing. Jonas Stienen committed
221
	add_definitions( -DITA_BASE_STATIC -DITA_DATA_SOURCES_STATIC -DITA_DIFFRACTION_STATIC -DITA_GEO_STATIC -DITA_CONVOLUTION_STATIC -DITA_FFT_STATIC -DITA_CTC_STATIC -DITA_DSP_STATIC -DITA_SAMPLER_STATIC )
Dipl.-Ing. Jonas Stienen's avatar
Dipl.-Ing. Jonas Stienen committed
222
endif( )
223 224 225

if( ITA_VISTA_BUILD_STATIC )
	add_definitions( -DVISTABASE_STATIC -DVISTAMATH_STATIC -DVISTAASPECTS_STATIC -DVISTATOOLS_STATIC -DVISTAINTERPROCCOMM_STATIC )
Dipl.-Ing. Jonas Stienen's avatar
Dipl.-Ing. Jonas Stienen committed
226
endif( )
227

Jonas Stienen's avatar
Jonas Stienen committed
228
add_definitions( -DIEEE754_64FLOAT=1 )
229 230 231 232 233 234 235 236 237
if( NOT ITA_VA_BUILD_STATIC )
	add_definitions( -DVACORE_EXPORTS )
else( NOT ITA_VA_BUILD_STATIC )
	add_definitions( -DVABASE_STATIC -DVACORE_STATIC )
	set( BUILD_SHARED_LIBS_TEMP ${BUILD_SHARED_LIBS} )
	if( BUILD_SHARED_LIBS )
		set( BUILD_SHARED_LIBS OFF )
		message( "Ignoring activated BUILD_SHARED_LIBS temporary because static VA requested" )
	endif( BUILD_SHARED_LIBS )
Dipl.-Ing. Jonas Stienen's avatar
Dipl.-Ing. Jonas Stienen committed
238
endif( )
239

240 241 242
if( NOT WIN32 )
	add_definitions( -std=gnu++11 )
endif( )
Jonas Stienen's avatar
Jonas Stienen committed
243

244
add_definitions( "-DVACORE_DEFAULT_LOG_LEVEL=${ITA_VACORE_DEFAULT_DEBUG_LEVEL}" )
245 246
add_definitions( "-DVACORE_VERSION_MAJOR=\"${ITA_VACORE_VERSION_MAJOR}\"" )
add_definitions( "-DVACORE_VERSION_MINOR=\"${ITA_VACORE_VERSION_MINOR}\"" )
247

248 249
if( ITA_VACORE_MODULE_INTERFACE_ENABLED )
	add_definitions( "-DVACORE_MODULE_INTERFACE_ENABLED" )
250
endif( )
251 252
if( ITA_VACORE_NO_MODULE_INTERFACE_THROW_EXCEPTION )
	add_definitions( "-DVACORE_NO_MODULE_INTERFACE_THROW_EXCEPTION" )
253
endif( )
254 255
if( ITA_VACORE_EVENTS_ENABLED )
	add_definitions( "-DVACORE_EVENTS_ENABLED" )
256
endif( )
257

258
add_definitions( "-DVACORE_DEFAULT_CONFIGFILE=\"${ITA_VACORE_DEFAULT_CONFIG_FILE_NAME}\"" )
259 260
add_definitions( "-DVACORE_MAX_NUM_SOUND_SOURCES=${ITA_VACORE_MAX_NUM_SOUND_SOURCES}" )
add_definitions( "-DVACORE_MAX_NUM_SOUND_RECEIVERS=${ITA_VACORE_MAX_NUM_SOUND_RECEIVERS}" )
261

262 263 264 265
if( ITA_VACORE_WITH_AUDIO_BACKEND_ASIO )
	add_definitions( -DVACORE_WITH_AUDIO_BACKEND_ASIO )
endif( )
if( ITA_VACORE_WITH_AUDIO_BACKEND_PORTAUDIO )
266
	add_definitions( -DVACORE_WITH_AUDIO_BACKEND_PORTAUDIO )
267
endif( )
268 269
if( ITA_VACORE_WITH_AUDIO_BACKEND_VIRTUAL )
	add_definitions( -DVACORE_WITH_AUDIO_BACKEND_VIRTUAL )
270 271
endif( )

272
# Rendering definitions
273 274
if( ITA_VACORE_WITH_RENDERER_AMBIENT_MIXER )
	add_definitions( "-DVACORE_WITH_RENDERER_AMBIENT_MIXER" )
275
endif( )
276 277
if( ITA_VACORE_WITH_RENDERER_AMBISONICS_FREE_FIELD )
	add_definitions( "-DVACORE_WITH_RENDERER_AMBISONICS_FREE_FIELD" )
278
endif( )
279 280
if( ITA_VACORE_WITH_RENDERER_BINAURAL_FREE_FIELD )
	add_definitions( "-DVACORE_WITH_RENDERER_BINAURAL_FREE_FIELD" )
281
endif( )
282
if( ITA_VACORE_WITH_RENDERER_BINAURAL_ARTIFICIAL_REVERB )
283
	vista_use_package( DspFilters REQUIRED FIND_DEPENDENCIES )
284
	add_definitions( "-DVACORE_WITH_RENDERER_BINAURAL_ARTIFICIAL_REVERB" )
285
endif( )
286
if( ITA_VACORE_WITH_RENDERER_BINAURAL_ROOM_ACOUSTICS )
287 288
	if( RAVENNET_FOUND )
		vista_use_package( RavenNet REQUIRED FIND_DEPENDENCIES )
289 290
		add_definitions( "-DVACORE_WITH_RENDERER_BINAURAL_ROOM_ACOUSTICS" )
	else( )
291
		message( "Could not find RavenNet, which is required by binaural room acoustics audio renderer" )
292
	endif( )
293
endif( )
294
if( ITA_VACORE_WITH_RENDERER_BINAURAL_AIR_TRAFFIC_NOISE )
295
	add_definitions( "-DVACORE_WITH_RENDERER_BINAURAL_AIR_TRAFFIC_NOISE" )
296
endif( )
297 298
if( ITA_VACORE_WITH_RENDERER_BINAURAL_OUTDOOR_NOISE )
	add_definitions( -DVACORE_WITH_RENDERER_BINAURAL_OUTDOOR_NOISE )
299
endif( )
300 301
if( ITA_VACORE_WITH_RENDERER_PROTOTYPE_FREE_FIELD )
	add_definitions( "-DVACORE_WITH_RENDERER_PROTOTYPE_FREE_FIELD" )
302
endif( )
303 304
if( ITA_VACORE_WITH_RENDERER_PROTOTYPE_DUMMY )
	add_definitions( "-DVACORE_WITH_RENDERER_PROTOTYPE_DUMMY" )
305
endif( )
306 307
if( ITA_VACORE_WITH_RENDERER_PROTOTYPE_HEARING_AID )
	add_definitions( "-DVACORE_WITH_RENDERER_PROTOTYPE_HEARING_AID" )
308
endif( )
309 310
if( ITA_VACORE_WITH_RENDERER_PROTOTYPE_GENERIC_PATH )
	add_definitions( "-DVACORE_WITH_RENDERER_PROTOTYPE_GENERIC_PATH" )
311
endif( )
312 313 314
if( ITA_VACORE_WITH_RENDERER_PROTOTYPE_IMAGE_SOURCE )
	add_definitions( "-DVACORE_WITH_RENDERER_PROTOTYPE_IMAGE_SOURCE" )
endif( )
315 316
if( ITA_VACORE_WITH_RENDERER_VBAP_FREE_FIELD )
	add_definitions( "-DVACORE_WITH_RENDERER_VBAP_FREE_FIELD" )
317
endif( )
318 319
if( ITA_VACORE_WITH_RENDERER_BINAURAL_CLUSTERING )
	add_definitions( "-DVACORE_WITH_RENDERER_BINAURAL_CLUSTERING" )
320
endif( )
321 322

# Reproduction definitions
323 324
if( ITA_VACORE_WITH_REPRODUCTION_TALKTHROUGH )
	add_definitions( "-DVACORE_WITH_REPRODUCTION_TALKTHROUGH" )
325
endif( )
326 327
if( ITA_VACORE_WITH_REPRODUCTION_HEADPHONES )
	add_definitions( "-DVACORE_WITH_REPRODUCTION_HEADPHONES" )
328
endif( )
329 330
if( ITA_VACORE_WITH_REPRODUCTION_AMBISONICS )
	add_definitions( "-DVACORE_WITH_REPRODUCTION_AMBISONICS" )
331
endif( )
332 333
if( ITA_VACORE_WITH_REPRODUCTION_BINAURAL_NCTC )
	add_definitions( "-DVACORE_WITH_REPRODUCTION_BINAURAL_NCTC" )
334
endif( )
335 336
if( ITA_VACORE_WITH_REPRODUCTION_BINAURAL_MIXDOWN )
	add_definitions( "-DVACORE_WITH_REPRODUCTION_BINAURAL_MIXDOWN" )
337
endif( )
338 339
if( ITA_VACORE_WITH_REPRODUCTION_AMBISONICS_BINAURAL_MIXDOWN )
	add_definitions( "-DVACORE_WITH_REPRODUCTION_AMBISONICS_BINAURAL_MIXDOWN" )
340
endif( )
341 342
if( ITA_VACORE_WITH_REPRODUCTION_MIXER_LOW_FREQUENCY )
	add_definitions( "-DVACORE_WITH_REPRODUCTION_MIXER_LOW_FREQUENCY" )
343
endif( )
344 345 346

string( TIMESTAMP VACORE_CMAKE_DATE "%Y-%m-%d" )
add_definitions( "-DVACORE_CMAKE_DATE=\"${VACORE_CMAKE_DATE}\"" )
347

348
if( ITA_VACORE_WITH_TTS_SIGNAL_SOURCE )
349
	vista_use_package( CereVoice REQUIRED FIND_DEPENDENCIES)
350
	vista_use_package( samplerate REQUIRED FIND_DEPENDENCIES)
351 352 353
	if( VCEREVOICE_FOUND )
		add_definitions( "-DVACORE_WITH_TTS_SIGNAL_SOURCE" )
	endif( )
354 355
endif( )

356 357 358
# Dev switches
if( ITA_VACORE_REPRODUCTION_NCTC_WITH_SWEET_SPOT_WIDENING )
	add_definitions( "-DVACORE_REPRODUCTION_NCTC_WITH_SWEET_SPOT_WIDENING" )
359
endif( )
360

361 362 363 364
# Files
vista_add_files_to_sources( ProjectSources "conf" NON_RECURSIVE SOURCE_GROUP "conf" "ini" )
vista_add_files_to_sources( ProjectSources "data" SOURCE_GROUP_MIRROR_DIR "data" "wav" "daff" "mat" "ac" "skp" )

365

366
add_library( VACore ${ProjectSources} "conf/VACore.ini.proto" )
367 368 369
target_link_libraries( VACore ${VISTA_USE_PACKAGE_LIBRARIES} ) # contains all libraries from vista_use_package() calls
set( BUILD_SHARED_LIBS ${BUILD_SHARED_LIBS_TEMP} )

Jonas Stienen's avatar
Jonas Stienen committed
370 371 372 373 374 375 376 377 378

vista_configure_lib( VACore )
set( VACORE_INCLUDE_OUTDIR "${CMAKE_CURRENT_SOURCE_DIR}/include" )
vista_install( VACore )
vista_create_cmake_configs( VACore )
vista_create_default_info_file( VACore )

set_property( TARGET VACore PROPERTY FOLDER "VA" )

379
# VA core configuration file
380 381 382 383 384
if( NOT EXISTS "${CMAKE_CURRENT_SOURCE_DIR}/conf/${ITA_VACORE_DEFAULT_CONFIG_FILE_NAME}" )
	configure_file( "conf/VACore.ini.proto" "${CMAKE_CURRENT_SOURCE_DIR}/conf/${ITA_VACORE_DEFAULT_CONFIG_FILE_NAME}" @ONLY	)
else()
	message( "conf/VACore.ini exists, skipping overwrite. Manually remove generated conf/VACore.ini first, if you want to re-generate from default prototype config file." )
endif()
385

386 387
# deploy	
if( ITA_VACORE_DEPLOY_WITH_COMMON_DATA )
388 389 390 391 392 393
	install( FILES "data/HD650_all_inv.wav" DESTINATION "data" )
	install( FILES "data/ITA_Artificial_Head_5x5_44kHz_128.v17.ir.daff" DESTINATION "data" )
	install( FILES "data/License.md" DESTINATION "data" )
	install( FILES "data/Singer.v17.ms.daff" DESTINATION "data" )
	install( FILES "data/Trumpet1.v17.ms.daff" DESTINATION "data" )
	install( FILES "data/WelcomeToVA.wav" DESTINATION "data" )
Dipl.-Ing. Jonas Stienen's avatar
Dipl.-Ing. Jonas Stienen committed
394
	install( FILES "data/ambeo_rir_ita_doorway.wav" DESTINATION "data" )
395 396 397
endif( )

if( ITA_VACORE_DEPLOY_WITH_COMMON_CONFIGS )
398
	install( DIRECTORY "conf" DESTINATION "." FILES_MATCHING PATTERN "*.ini" )
399 400 401
endif( )

if( ITA_VACORE_DEPLOY_WITH_COMMON_SCRIPTS )
402
	# nothing yet
403 404
endif( )

Dipl.-Ing. Jonas Stienen's avatar
Dipl.-Ing. Jonas Stienen committed
405 406 407
if( ITA_VA_INSTALL_WITH_DLLS )
	vista_install_all_dlls( bin )
endif( )
408

Jonas Stienen's avatar
Jonas Stienen committed
409
# tests
410
if( ITA_VA_WITH_TESTS OR ITA_VACORE_WITH_TESTS )
411 412
	set( VACORE_COMMON_BUILD TRUE )
	add_subdirectory( "${CMAKE_CURRENT_SOURCE_DIR}/tests" )
413
endif( )
414 415 416 417 418 419 420


# benchmarks
if( ITA_VA_WITH_BENCHMARKS OR ITA_VACORE_WITH_BENCHMARKS )
	set( VACORE_COMMON_BUILD TRUE )
	add_subdirectory( "${CMAKE_CURRENT_SOURCE_DIR}/benchmarks" )
endif( )