Renewing cmake config v2

parent 79bba30c
......@@ -12,19 +12,19 @@ vista_use_package( Portaudio )
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 )
endif( )
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 )
endif( )
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 )
endif( )
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 )
endif( )
# includes
......@@ -57,40 +57,36 @@ set( ITAStreamingSources
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 )
endif( )
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 )
endif( )
if( ITA_STREAMING_WITH_BACKEND_VIRTUAL )
set( ITAStreamingHeader "${ITAStreamingHeader}" "include/ITAStreamingVirtualDevice.h" )
set( ITAStreamingSources "${ITAStreamingSources}" "src/ITAStreamingVirtualDevice.cpp" )
endif( ITA_STREAMING_WITH_BACKEND_VIRTUAL )
endif( )
# compiler
# compiler settings
if( NOT ITA_CORE_LIBS_BUILD_STATIC )
if( ITA_VISTA_BUILD_STATIC )
add_definitions( -DVISTABASE_STATIC -DVISTAMATH_STATIC -DVISTAASPECTS_STATIC -DVISTATOOLS_STATIC -DVISTAINTERPROCCOMM_STATIC )
endif( )
if( BUILD_SHARED_LIBS )
add_definitions( -DITA_STREAMING_EXPORT )
else( NOT ITA_CORE_LIBS_BUILD_STATIC )
add_definitions( -DITA_BASE_STATIC -ITA_STREAMING_STATIC )
set( BUILD_SHARED_LIBS_TEMP ${BUILD_SHARED_LIBS} )
if( BUILD_SHARED_LIBS )
set( BUILD_SHARED_LIBS OFF )
message( "Ignoring activated BUILD_SHARED_LIBS temporary because static ITA core libs requested" )
endif( BUILD_SHARED_LIBS )
endif( NOT ITA_CORE_LIBS_BUILD_STATIC )
else( )
add_definitions( -ITA_STREAMING_STATIC -DITA_BASE_STATIC )
endif( )
# linker
add_library( ITAStreaming ${ITAStreamingHeader} ${ITAStreamingSources} )
target_link_libraries( ITAStreaming ${VISTA_USE_PACKAGE_LIBRARIES} )
set( BUILD_SHARED_LIBS ${BUILD_SHARED_LIBS_TEMP} )
# config
vista_configure_lib( ITAStreaming )
......@@ -103,5 +99,7 @@ set_property( TARGET ITAStreaming PROPERTY FOLDER "ITACoreLibs" )
# tests
set( ITASTREAMING_COMMON_BUILD TRUE )
add_subdirectory( "${CMAKE_CURRENT_SOURCE_DIR}/tests" )
if( ITA_CORE_LIBS_WITH_TESTS )
set( ITASTREAMING_COMMON_BUILD TRUE )
add_subdirectory( "${CMAKE_CURRENT_SOURCE_DIR}/tests" )
endif( )
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment