CMakeLists.txt 3.26 KB
Newer Older
1
2
3
4
5
6
7
8
9
10
cmake_minimum_required( VERSION 3.0 )

project( ITADSP )

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 )
11
12
13
vista_use_package( ITAConvolution REQUIRED FIND_DEPENDENCIES ) # required for FIR filtering (uses block convolver)
vista_use_package( TBB REQUIRED FIND_DEPENDENCIES )
vista_use_package( SPLINE REQUIRED FIND_DEPENDENCIES )
14
vista_find_package( libjson OPTIONAL QUIET )
15
vista_find_package( MKL OPTIONAL QUIET )
16
17
18
19

if( NOT DEFINED ITA_DSP_WITH_JSON_SUPPORT )
	set( ITA_DSP_WITH_JSON_SUPPORT ${LIBJSON_FOUND} CACHE BOOL "Build ITA DSP with JSON support" )
endif( )
20

21
22
23
24
if( NOT ITA_DSP_WITH_INTEL_MKL_SUPPORT )
	set( ITA_DSP_WITH_INTEL_MKL_SUPPORT ${MKL_FOUND} CACHE BOOL "Build ITA DSP with Intel MKL support" )
endif( )

25
26
27
28
29
30
# includes
include_directories( "include" )


# sources
set( ITADSPHeader
31
	"include/ITADSP/ThirdOctaveFilterbank/IIRBurg.h"
32
33
	"include/ITADSPDefinitions.h"
	"include/ITASIMOVariableDelayLine.h"
34
	"include/ITASIMOVariableDelayLineBase.h"
35
	"include/ITAVariableDelayLine.h"
36
	"include/ITABiquad.h"
37
	"include/ITAIIRFilterGenerator.h"
38
	"include/ITAIIRFilterEngine.h"
39
	"include/ITAIIRUtils.h"
40
41
42
43
	"include/ITAThirdOctaveFilterbank.h"
	"include/ITAThirdOctaveFilterbankFIR.h"
	"include/ITAThirdOctaveFilterbankIIR.h"
	"include/ITAThirdOctaveFIRFilterGenerator.h"
44
45
	)
set( ITADSPSources
46
	"src/ITADSP/ThirdOctaveFilterbank/IIRBurg.cpp"
47
	"src/ITASIMOVariableDelayLine.cpp"
48
	"src/ITASIMOVariableDelayLineBase.cpp"
49
	"src/ITABiquad.cpp"
50
	"src/ITAIIRUtils.cpp"
51
	"src/ITAIIRFilterGenerator.cpp"
52
	"src/ITAIIRFilterEngine.cpp"
53
54
55
	"src/ITAThirdOctaveFilterbank.cpp"
	"src/ITAThirdOctaveFilterbankIIR.cpp"
	"src/ITAThirdOctaveFIRFilterGenerator.cpp"
56
	"src/ITAThirdOctaveFilterbankIIRCoefficients.h"
57
	"src/ITAVariableDelayLine.cpp"
58
59
60
61
62
63
	)	


# compiler settings
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
64
65
66
	if( WIN32 )
		list( APPEND VISTA_USE_PACKAGE_LIBRARIES Ws2_32 )
	endif( )
67
68
69
70
endif( )
if( BUILD_SHARED_LIBS )
	add_definitions( -DITA_DSP_EXPORT )
else( )
71
	add_definitions( -DITA_DSP_STATIC -DITA_FFT_STATIC -DITA_BASE_STATIC -DITA_CONVOLUTION_STATIC )
72
73
74
75
76
77
78
endif( )

if( NOT WIN32 )
	add_definitions( -std=gnu++11)
endif( )


79
80
81
82
83
if( ITA_DSP_WITH_JSON_SUPPORT )
	vista_use_package( libjson REQUIRED )
	add_definitions( -DWITH_JSON_SUPPORT )
endif( )

84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
# linker
add_library( ITADSP ${ITADSPHeader} ${ITADSPSources} )
target_link_libraries( ITADSP ${VISTA_USE_PACKAGE_LIBRARIES} )


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

set_property( TARGET ITADSP PROPERTY FOLDER "ITACoreLibs" )


# apps
if( ITA_CORE_LIBS_WITH_APPS )
Dipl.-Ing. Jonas Stienen's avatar
Dipl.-Ing. Jonas Stienen committed
101
	set( ITA_DSP_COMMON_BUILD TRUE )
102
103
104
105
106
107
	#add_subdirectory( "${CMAKE_CURRENT_SOURCE_DIR}/apps" )
endif( )


# tests
if( ITA_CORE_LIBS_WITH_TESTS )
Dipl.-Ing. Jonas Stienen's avatar
Dipl.-Ing. Jonas Stienen committed
108
109
	set( ITA_DSP_COMMON_BUILD TRUE )
	add_subdirectory( "${CMAKE_CURRENT_SOURCE_DIR}/tests" )
110
endif( )
111
112
113
114
115
116
117


# benchmarks
if( ITA_CORE_LIBS_WITH_BENCHMARKS )
	set( ITA_DSP_COMMON_BUILD TRUE )
	add_subdirectory( "${CMAKE_CURRENT_SOURCE_DIR}/benchmarks" )
endif( )