Commit abb89a8c authored by Dipl.-Ing. Jonas Stienen's avatar Dipl.-Ing. Jonas Stienen
Browse files

Renewing cmake config

parent a9b3c64a
...@@ -13,25 +13,18 @@ vista_use_package( ASIO QUIET ) ...@@ -13,25 +13,18 @@ vista_use_package( ASIO QUIET )
vista_use_package( Portaudio QUIET ) vista_use_package( Portaudio QUIET )
vista_use_package( JACK QUIET ) vista_use_package( JACK QUIET )
if( NOT DEFINED ITA_VISTA_BUILD_STATIC )
set( ITA_VISTA_BUILD_STATIC OFF CACHE BOOL "Build against static ViSTA libraries" )
endif( NOT DEFINED ITA_VISTA_BUILD_STATIC )
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 )
if( NOT DEFINED ITA_DATA_SOURCE_WITH_INTEGRATED_ASIO ) if( NOT DEFINED ITA_DATA_SOURCE_WITH_INTEGRATED_ASIO )
set( ITA_DATA_SOURCE_WITH_INTEGRATED_ASIO ${VASIO_FOUND} CACHE BOOL "Build with ASIO support" ) set( ITA_DATA_SOURCE_WITH_INTEGRATED_ASIO ${VASIO_FOUND} CACHE BOOL "Build with ASIO support" )
endif( NOT DEFINED ITA_DATA_SOURCE_WITH_INTEGRATED_ASIO ) endif( )
if( NOT DEFINED ITA_DATA_SOURCE_WITH_INTEGRATED_PORTAUDIO ) if( NOT DEFINED ITA_DATA_SOURCE_WITH_INTEGRATED_PORTAUDIO )
set( ITA_DATA_SOURCE_WITH_INTEGRATED_PORTAUDIO ${VPORTAUDIO_FOUND} CACHE BOOL "Build with Portaudio support" ) set( ITA_DATA_SOURCE_WITH_INTEGRATED_PORTAUDIO ${VPORTAUDIO_FOUND} CACHE BOOL "Build with Portaudio support" )
endif( NOT DEFINED ITA_DATA_SOURCE_WITH_INTEGRATED_PORTAUDIO ) endif( )
if( NOT DEFINED ITA_DATA_SOURCE_WITH_INTEGRATED_JACK ) if( NOT DEFINED ITA_DATA_SOURCE_WITH_INTEGRATED_JACK )
set( ITA_DATA_SOURCE_WITH_INTEGRATED_JACK ${VJACK_FOUND} CACHE BOOL "Build with JACK2 support" ) set( ITA_DATA_SOURCE_WITH_INTEGRATED_JACK ${VJACK_FOUND} CACHE BOOL "Build with JACK2 support" )
endif( NOT DEFINED ITA_DATA_SOURCE_WITH_INTEGRATED_JACK ) endif( )
# includes # includes
...@@ -99,54 +92,46 @@ list( APPEND ITADataSourcesSources "src/ITADataSourceUtils.cpp" ) ...@@ -99,54 +92,46 @@ list( APPEND ITADataSourcesSources "src/ITADataSourceUtils.cpp" )
if( WIN32 ) if( WIN32 )
list( APPEND ITADataSourcesHeader "include/ITAStreamPump.h" "include/ITADataSourceUtils.h" ) list( APPEND ITADataSourcesHeader "include/ITAStreamPump.h" "include/ITADataSourceUtils.h" )
list( APPEND ITADataSourcesSources "src/ITAStreamPump.cpp" "src/ITADataSourceUtils.cpp" ) list( APPEND ITADataSourcesSources "src/ITAStreamPump.cpp" "src/ITADataSourceUtils.cpp" )
endif( WIN32 ) endif( )
if( VASIO_FOUND AND ITA_DATA_SOURCE_WITH_INTEGRATED_ASIO ) if( VASIO_FOUND AND ITA_DATA_SOURCE_WITH_INTEGRATED_ASIO )
list( APPEND ITADataSourcesHeader "include/ITAAsioInterface.h" ) list( APPEND ITADataSourcesHeader "include/ITAAsioInterface.h" )
list( APPEND ITADataSourcesSources "src/ITAAsioInterface.cpp" ) list( APPEND ITADataSourcesSources "src/ITAAsioInterface.cpp" )
add_definitions( -DIEEE754_64FLOAT=1 ) add_definitions( -DIEEE754_64FLOAT=1 )
endif( VASIO_FOUND AND ITA_DATA_SOURCE_WITH_INTEGRATED_ASIO ) endif( )
if( VPORTAUDIO_FOUND AND ITA_DATA_SOURCE_WITH_INTEGRATED_PORTAUDIO ) if( VPORTAUDIO_FOUND AND ITA_DATA_SOURCE_WITH_INTEGRATED_PORTAUDIO )
list( APPEND ITADataSourcesHeader "include/ITAPortaudioInterface.h" ) list( APPEND ITADataSourcesHeader "include/ITAPortaudioInterface.h" )
list( APPEND ITADataSourcesSources "src/ITAPortaudioInterface.cpp" ) list( APPEND ITADataSourcesSources "src/ITAPortaudioInterface.cpp" )
endif( VPORTAUDIO_FOUND AND ITA_DATA_SOURCE_WITH_INTEGRATED_PORTAUDIO ) endif( )
if( VJACK_FOUND AND ITA_DATA_SOURCE_WITH_INTEGRATED_JACK ) if( VJACK_FOUND AND ITA_DATA_SOURCE_WITH_INTEGRATED_JACK )
list( APPEND ITADataSourcesHeader "include/ITAJACKInterface.h" ) list( APPEND ITADataSourcesHeader "include/ITAJACKInterface.h" )
list( APPEND ITADataSourcesSources "src/ITAJACKInterface.cpp" ) list( APPEND ITADataSourcesSources "src/ITAJACKInterface.cpp" )
endif( VJACK_FOUND AND ITA_DATA_SOURCE_WITH_INTEGRATED_JACK ) endif( )
# compiler settings # compiler settings
if( ITA_VISTA_BUILD_STATIC ) if( ITA_VISTA_BUILD_STATIC )
add_definitions( -DVISTABASE_STATIC -DVISTAMATH_STATIC -DVISTAASPECTS_STATIC -DVISTATOOLS_STATIC -DVISTAINTERPROCCOMM_STATIC ) add_definitions( -DVISTABASE_STATIC -DVISTAMATH_STATIC -DVISTAASPECTS_STATIC -DVISTATOOLS_STATIC -DVISTAINTERPROCCOMM_STATIC )
endif( ITA_VISTA_BUILD_STATIC ) endif( )
if( BUILD_SHARED_LIBS )
if( NOT ITA_CORE_LIBS_BUILD_STATIC )
add_definitions( -DITA_DATA_SOURCES_EXPORT ) add_definitions( -DITA_DATA_SOURCES_EXPORT )
else( NOT ITA_CORE_LIBS_BUILD_STATIC ) else( )
add_definitions( -DITA_BASE_STATIC -DITA_DATA_SOURCES_STATIC ) add_definitions( -DITA_BASE_STATIC -DITA_DATA_SOURCES_STATIC )
set( BUILD_SHARED_LIBS_TEMP ${BUILD_SHARED_LIBS} ) endif( )
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 )
#target_compile_features(ITADataSources PRIVATE cxx_range_for) #target_compile_features(ITADataSources PRIVATE cxx_range_for)
if( NOT WIN32 ) if( NOT WIN32 )
add_definitions( -std=c++11 ) add_definitions( -std=c++11 )
endif( NOT WIN32) endif( )
# linker # linker
add_library( ITADataSources ${ITADataSourcesHeader} ${ITADataSourcesSources} ) add_library( ITADataSources ${ITADataSourcesHeader} ${ITADataSourcesSources} )
target_link_libraries( ITADataSources ${VISTA_USE_PACKAGE_LIBRARIES} ) target_link_libraries( ITADataSources ${VISTA_USE_PACKAGE_LIBRARIES} )
set( BUILD_SHARED_LIBS ${BUILD_SHARED_LIBS_TEMP} )
# config # config
vista_configure_lib( ITADataSources ) vista_configure_lib( ITADataSources )
...@@ -159,10 +144,14 @@ set_property( TARGET ITADataSources PROPERTY FOLDER "ITACoreLibs" ) ...@@ -159,10 +144,14 @@ set_property( TARGET ITADataSources PROPERTY FOLDER "ITACoreLibs" )
# apps # apps
set( ITADATASOURCES_COMMON_BUILD TRUE ) if( ITA_CORE_LIBS_WITH_APPS )
add_subdirectory( "${CMAKE_CURRENT_SOURCE_DIR}/apps/ita_whad" ) set( ITADATASOURCES_COMMON_BUILD TRUE )
add_subdirectory( "${CMAKE_CURRENT_SOURCE_DIR}/apps/ita_whad" )
endif( )
# tests # tests
set( ITADATASOURCES_COMMON_BUILD TRUE ) if( ITA_CORE_LIBS_WITH_TESTS )
add_subdirectory( "${CMAKE_CURRENT_SOURCE_DIR}/tests" ) set( ITADATASOURCES_COMMON_BUILD TRUE )
add_subdirectory( "${CMAKE_CURRENT_SOURCE_DIR}/tests" )
endif( )
cmake_minimum_required( VERSION 2.8 ) cmake_minimum_required( VERSION 2.8 )
if( NOT ITADATASOURCES_COMMON_BUILD ) project( ita_whad )
list( APPEND CMAKE_MODULE_PATH "$ENV{VISTA_CMAKE_COMMON}" )
project( ita_whad ) include( VistaCommon )
list( APPEND CMAKE_MODULE_PATH "$ENV{VISTA_CMAKE_COMMON}" )
include( VistaCommon )
endif()
vista_use_package( ITADataSources REQUIRED FIND_DEPENDENCIES ) vista_use_package( ITADataSources REQUIRED FIND_DEPENDENCIES )
...@@ -18,9 +14,6 @@ if( ITA_DATA_SOURCE_WITH_INTEGRATED_PORTAUDIO ) ...@@ -18,9 +14,6 @@ if( ITA_DATA_SOURCE_WITH_INTEGRATED_PORTAUDIO )
add_definitions( "-DITA_WHAD_WITH_PORTAUDIO" ) add_definitions( "-DITA_WHAD_WITH_PORTAUDIO" )
endif( ITA_DATA_SOURCE_WITH_INTEGRATED_PORTAUDIO ) endif( ITA_DATA_SOURCE_WITH_INTEGRATED_PORTAUDIO )
add_definitions( -DITA_DATA_SOURCES_DLL )
add_executable( ita_whad main.cpp ) add_executable( ita_whad main.cpp )
target_link_libraries( ita_whad ${VISTA_USE_PACKAGE_LIBRARIES} ) target_link_libraries( ita_whad ${VISTA_USE_PACKAGE_LIBRARIES} )
...@@ -29,3 +22,7 @@ vista_install( ita_whad ) ...@@ -29,3 +22,7 @@ vista_install( ita_whad )
vista_create_default_info_file( ita_whad ) vista_create_default_info_file( ita_whad )
set_property( TARGET ita_whad PROPERTY FOLDER "ITACoreLibs/Apps/ITADataSources" ) set_property( TARGET ita_whad PROPERTY FOLDER "ITACoreLibs/Apps/ITADataSources" )
if( ITA_CORE_LIBS_INSTALL_WITH_DLLS )
vista_install_all_dlls( bin )
endif( )
cmake_minimum_required( VERSION 2.8 ) cmake_minimum_required( VERSION 2.8 )
if( NOT ITADATASOURCES_COMMON_BUILD ) project( ITADataSourcesTest )
list( APPEND CMAKE_MODULE_PATH "$ENV{VISTA_CMAKE_COMMON}" )
project( ITADataSourcesTest ) include( VistaCommon )
list( APPEND CMAKE_MODULE_PATH "$ENV{VISTA_CMAKE_COMMON}" )
include( VistaCommon )
endif()
vista_use_package( ITADataSources REQUIRED FIND_DEPENDENCIES ) vista_use_package( ITADataSources REQUIRED FIND_DEPENDENCIES )
if( ITA_CORE_LIBS_BUILD_STATIC AND DEFINED ITA_CORE_LIBS_BUILD_STATIC ) if( ITA_CORE_LIBS_BUILD_STATIC AND DEFINED ITA_CORE_LIBS_BUILD_STATIC )
add_definitions( -DITA_BASE_STATIC -DITA_DATA_SOURCES_STATIC ) add_definitions( -DITA_BASE_STATIC -DITA_DATA_SOURCES_STATIC )
endif( ITA_CORE_LIBS_BUILD_STATIC AND DEFINED ITA_CORE_LIBS_BUILD_STATIC ) endif( )
# todo fix with if( vista_staic )! # todo fix with if( vista_staic )!
add_definitions( -DVISTABASE_STATIC -DVISTAMATH_STATIC -DVISTAASPECTS_STATIC -DVISTATOOLS_STATIC -DVISTAINTERPROCCOMM_STATIC ) add_definitions( -DVISTABASE_STATIC -DVISTAMATH_STATIC -DVISTAASPECTS_STATIC -DVISTATOOLS_STATIC -DVISTAINTERPROCCOMM_STATIC )
......
Supports Markdown
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