CMakeLists.txt 2.57 KB
Newer Older
Jonas Stienen's avatar
Jonas Stienen committed
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
cmake_minimum_required( VERSION 2.8 )

project( ITACTC )

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

# dependencies
vista_use_package( ITABase REQUIRED FIND_DEPENDENCIES )
vista_use_package( ITAFFT REQUIRED FIND_DEPENDENCIES )
vista_use_package( ITADataSources REQUIRED FIND_DEPENDENCIES )
vista_use_package( ITAConvolution REQUIRED FIND_DEPENDENCIES )
vista_use_package( OpenDAFF REQUIRED )

if( NOT DEFINED ITA_CTC_WITH_DUAL_CTC )
	set( ITA_CTC_WITH_DUAL_CTC OFF CACHE BOOL "Build support for Crosstalk-Cancellation with arbitrary loudspeaker number and pose" )
endif( NOT DEFINED ITA_CTC_WITH_DUAL_CTC )

if( NOT DEFINED ITA_CTC_WITH_N_CTC )
	set( ITA_CTC_WITH_N_CTC ON CACHE BOOL "Build support for two-loudspeaker Crosstalk-Cancellation (deprecated)" )
endif( NOT DEFINED ITA_CTC_WITH_N_CTC )

if( NOT DEFINED ITA_CTC_WITH_QUAD_CTC )
	set( ITA_CTC_WITH_QUAD_CTC OFF CACHE BOOL "Build support for quad-loudspeaker Crosstalk-Cancellation (deprecated)" )
endif( NOT DEFINED ITA_CTC_WITH_QUAD_CTC )


# includes
include_directories( "include" )


# sources
set( ITACTCHeader
	"include/ITACTCDefinitions.h"
	"include/ITACTCUtils.h"
	"include/ITAHDFTSpectra.h"
	)
set( ITACTCSources
	"src/ITACTCUtils.cpp"
	"src/ITAHDFTSpectra.cpp"
	)

if( ITA_CTC_WITH_DUAL_CTC )
	set( ITACTCHeader "${ITACTCHeader}"	"include/ITADualCTC.h" "include/ITADualCTCStreamFilter.h" )
	set( ITACTCSources "${ITACTCSources}" "src/ITADualCTC.cpp" "src/ITADualCTCStreamFilter.cpp" )
endif( ITA_CTC_WITH_DUAL_CTC )
if( ITA_CTC_WITH_N_CTC )
	set( ITACTCHeader "${ITACTCHeader}"	"include/ITANCTC.h" "include/ITANCTCStreamFilter.h" )
	set( ITACTCSources "${ITACTCSources}" "src/ITANCTC.cpp" "src/ITANCTCStreamFilter.cpp" )
endif( ITA_CTC_WITH_N_CTC )
if( ITA_CTC_WITH_QUAD_CTC )
	set( ITACTCHeader "${ITACTCHeader}"	"include/ITAQuadCTC.h" "include/ITAQuadCTCStreamFilter.h" )
	set( ITACTCSources "${ITACTCSources}" "src/ITAQuadCTC.cpp" "src/ITAQuadCTCStreamFilter.cpp" )
endif( ITA_CTC_WITH_QUAD_CTC )


# compiler
add_definitions( -DITA_BASE_DLL -DITA_FFT_DLL -DITA_CONVOLUTION_DLL -DITA_CTC_DLL -DITA_CTC_EXPORT )


# linker
add_library( ITACTC SHARED ${ITACTCHeader} ${ITACTCSources} )
target_link_libraries( ITACTC ${VISTA_USE_PACKAGE_LIBRARIES} )


# configure
vista_configure_lib( ITACTC )
vista_install( ITACTC )
set( ITACTC_INCLUDE_OUTDIR "${CMAKE_CURRENT_SOURCE_DIR}/include" )
vista_create_cmake_configs( ITACTC )
vista_create_default_info_file( ITACTC )

set_property( TARGET ITACTC PROPERTY FOLDER "ITACoreLibs" )


# tests
set( ITACTC_COMMON_BUILD TRUE )
add_subdirectory( "${CMAKE_CURRENT_SOURCE_DIR}/tests" )