CMakeLists.txt 2.04 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
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 )


# 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"
	)


45
# compiler settings
46 47
if( ITA_VISTA_BUILD_STATIC )
	add_definitions( -DVISTABASE_STATIC -DVISTAMATH_STATIC -DVISTAASPECTS_STATIC -DVISTATOOLS_STATIC -DVISTAINTERPROCCOMM_STATIC )
48 49 50 51 52 53 54
endif( )

if( BUILD_SHARED_LIBS )
	add_definitions( -DITA_SAMPLER_EXPORT )
else( )
	add_definitions( -DITA_SAMPLER_STATIC -DITA_CTC_STATIC -DITA_CONVOLUTION_STATIC -DITA_FFT_STATIC -DITA_BASE_STATIC -DITA_DATA_SOURCES_STATIC )
endif( )
Jonas Stienen's avatar
Jonas Stienen committed
55

Dipl.-Ing. Jonas Stienen's avatar
Dipl.-Ing. Jonas Stienen committed
56 57 58
if( NOT WIN32 )
	add_definitions( -std=gnu++11 )
endif( )
Jonas Stienen's avatar
Jonas Stienen committed
59 60

# linker
61
add_library( ITASampler ${ITASamplerHeader} ${ITASamplerSources} )
Jonas Stienen's avatar
Jonas Stienen committed
62 63 64 65 66 67 68 69 70 71 72 73 74 75
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
76 77 78 79
if( ITA_CORE_LIBS_WITH_TESTS )
	set( ITASAMPLER_COMMON_BUILD TRUE )
	add_subdirectory( "${CMAKE_CURRENT_SOURCE_DIR}/tests" )
endif( )