CMakeLists.txt 1.99 KB
Newer Older
Jonas Stienen's avatar
Jonas Stienen committed
1
2
3
4
5
6
7
8
9
10
11
12
cmake_minimum_required( VERSION 2.8 )

project( ITASampler )

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

# dependencies
vista_use_package( ITABase REQUIRED FIND_DEPENDENCIES )
vista_use_package( ITADataSources REQUIRED FIND_DEPENDENCIES )


13
14
15
16
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" )
endif( NOT DEFINED ITA_CORE_LIBS_BUILD_STATIC )

Jonas Stienen's avatar
Jonas Stienen committed
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
# includes
include_directories( "include" )


# sources
set( ITASamplerHeader
	"include/ITASampleClock.h"
	"include/ITASamplerDefinition.h"
	"include/ITASoundSample.h"
	"include/ITASoundSamplePool.h"
	"include/ITASoundSampler.h"
	)
set( ITASamplerSources
	"src/ITASoundSampler.cpp"
	"src/ITASoundSampleImpl.cpp"
	"src/ITASoundSampleImpl.h"
	"src/ITASoundSamplePool.cpp"
	"src/ITASoundSamplePoolImpl.cpp"
	"src/ITASoundSamplePoolImpl.h"
	"src/ITASoundSamplerImpl.h"
	"src/ITASoundSamplerImpl.cpp"
	"src/ITASoundSamplerImpl.h"
	"src/ITASoundSamplerImpl.cpp"
	"src/ITASoundSamplerPlayback.h"
	"src/ITASoundSamplerSlot.h"
	"src/ITASoundSamplerSlotbuffer.h"
	"src/ITASoundSamplerSlotbuffer.cpp"
	"src/PlaybackIDGenerator.cpp"
	"src/PlaybackIDGenerator.h"
	)


49
50
51
52
53
54
# compiler settings
if( NOT ITA_CORE_LIBS_BUILD_STATIC )
	add_definitions( -DITA_SAMPLER_EXPORT )
else( NOT ITA_CORE_LIBS_BUILD_STATIC )
	add_definitions( -DITA_BASE_STATIC -ITA_DATA_SOURCES_STATIC -DITA_SAMPLER_STATIC )
endif( NOT ITA_CORE_LIBS_BUILD_STATIC )
Jonas Stienen's avatar
Jonas Stienen committed
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74


# linker
add_library( ITASampler SHARED ${ITASamplerHeader} ${ITASamplerSources} )
target_link_libraries( ITASampler ${VISTA_USE_PACKAGE_LIBRARIES} )


# config
vista_configure_lib( ITASampler )
vista_install( ITASampler )
set( ITASAMPLER_INCLUDE_OUTDIR "${CMAKE_CURRENT_SOURCE_DIR}/include" )
vista_create_cmake_configs( ITASampler )
vista_create_default_info_file( ITASampler )

set_property( TARGET ITASampler PROPERTY FOLDER "ITACoreLibs" )

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