cmake_minimum_required( VERSION 2.8 ) project( ITAStreaming ) list( APPEND CMAKE_MODULE_PATH "$ENV{VISTA_CMAKE_COMMON}" ) include( VistaCommon ) # dependencies vista_use_package( ITABase REQUIRED FIND_DEPENDENCIES ) vista_use_package( ASIO ) vista_use_package( Portaudio ) if( NOT DEFINED ITA_STREAMING_WITH_BACKEND_ASIO ) set( ITA_STREAMING_WITH_BACKEND_ASIO ${VASIO_FOUND} CACHE BOOL "Build with ASIO for audio streaming" ) endif( NOT DEFINED ITA_STREAMING_WITH_BACKEND_ASIO ) if( NOT DEFINED ITA_STREAMING_WITH_BACKEND_PORTAUDIO ) set( ITA_STREAMING_WITH_BACKEND_PORTAUDIO OFF CACHE BOOL "Build with Portaudio for audio streaming" ) endif( NOT DEFINED ITA_STREAMING_WITH_BACKEND_PORTAUDIO ) if( NOT DEFINED ITA_STREAMING_WITH_BACKEND_VIRTUAL ) set( ITA_STREAMING_WITH_BACKEND_VIRTUAL ON CACHE BOOL "Build with virtual audio streaming backend" ) endif( NOT DEFINED ITA_STREAMING_WITH_BACKEND_VIRTUAL ) # includes include_directories( "include" ) # sources set( ITAStreamingHeader "include/ITAStreamingBackend.h" "include/ITAStreamingDefinitions.h" "include/ITAStreamingComponent.h" "include/ITAStreamingFunctionGenerator.h" "include/ITAStreamingDevice.h" "include/ITAStreamingProperties.h" "include/ITAStreamingSource.h" "include/ITAStreamingSourceRealization.h" "include/ITAStreamingState.h" ) set( ITAStreamingSources "src/ITAStreamingBackend.cpp" "src/ITAStreamingComponent.cpp" "src/ITAStreamingFunctionGenerator.cpp" "src/ITAStreamingProperties.cpp" "src/ITAStreamingSource.cpp" "src/ITAStreamingSourceRealization.cpp" "src/ITAStreamingState.cpp" ) if( ITA_STREAMING_WITH_BACKEND_ASIO AND VASIO_FOUND ) set( ITAStreamingSources "${ITAStreamingSources}" "src/ITAStreamingBackendASIO.h" "src/ITAStreamingBackendASIO.cpp" ) add_definitions( -DITA_STREAMING_WITH_BACKEND_ASIO -DIEEE754_64FLOAT=1 ) endif( ITA_STREAMING_WITH_BACKEND_ASIO AND VASIO_FOUND ) if( ITA_STREAMING_WITH_BACKEND_PORTAUDIO AND VPORTAUDIO_FOUND ) set( ITAStreamingSources "${ITAStreamingSources}" "src/ITAStreamingBackendPortaudio.h" "src/ITAStreamingBackendPortaudio.cpp" ) add_definitions( -DITA_STREAMING_WITH_BACKEND_PORTAUDIO ) endif( ITA_STREAMING_WITH_BACKEND_PORTAUDIO AND VPORTAUDIO_FOUND ) if( ITA_STREAMING_WITH_BACKEND_VIRTUAL ) set( ITAStreamingHeader "${ITAStreamingHeader}" "include/ITAStreamingVirtualDevice.h" ) set( ITAStreamingSources "${ITAStreamingSources}" "src/ITAStreamingVirtualDevice.cpp" ) endif( ITA_STREAMING_WITH_BACKEND_VIRTUAL ) # compiler add_definitions( -DITA_BASE_DLL -DITA_STREAMING_DLL -DITA_STREAMING_EXPORT ) # linker add_library( ITAStreaming SHARED ${ITAStreamingHeader} ${ITAStreamingSources} ) target_link_libraries( ITAStreaming ${VISTA_USE_PACKAGE_LIBRARIES} ) # config vista_configure_lib( ITAStreaming ) vista_install( ITAStreaming ) set( ITASTREAMING_INCLUDE_OUTDIR "${CMAKE_CURRENT_SOURCE_DIR}/include" ) vista_create_cmake_configs( ITAStreaming ) vista_create_default_info_file( ITAStreaming ) set_property( TARGET ITAStreaming PROPERTY FOLDER "ITACoreLibs" ) # tests set( ITASTREAMING_COMMON_BUILD TRUE ) add_subdirectory( "${CMAKE_CURRENT_SOURCE_DIR}/tests" )