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

Switching to default dynamic lib build mode by changing base definition...

Switching to default dynamic lib build mode by changing base definition behavior. If you do not define anything, you will end up with a shared library, now.
parent b99fa1e4
...@@ -10,6 +10,10 @@ vista_use_package( ITABase REQUIRED FIND_DEPENDENCIES ) ...@@ -10,6 +10,10 @@ vista_use_package( ITABase REQUIRED FIND_DEPENDENCIES )
vista_use_package( ASIO ) vista_use_package( ASIO )
vista_use_package( Portaudio ) 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 )
if( NOT DEFINED ITA_STREAMING_WITH_BACKEND_ASIO ) if( NOT DEFINED ITA_STREAMING_WITH_BACKEND_ASIO )
set( ITA_STREAMING_WITH_BACKEND_ASIO ${VASIO_FOUND} CACHE BOOL "Build with ASIO for audio streaming" ) 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( NOT DEFINED ITA_STREAMING_WITH_BACKEND_ASIO )
...@@ -67,7 +71,13 @@ endif( ITA_STREAMING_WITH_BACKEND_VIRTUAL ) ...@@ -67,7 +71,13 @@ endif( ITA_STREAMING_WITH_BACKEND_VIRTUAL )
# compiler # compiler
add_definitions( -DITA_BASE_DLL -DITA_STREAMING_DLL -DITA_STREAMING_EXPORT )
# compiler settings
if( NOT ITA_CORE_LIBS_BUILD_STATIC )
add_definitions( -DITA_STREAMING_EXPORT )
else( NOT ITA_CORE_LIBS_BUILD_STATIC )
add_definitions( -DITA_BASE_STATIC -ITA_STREAMING_STATIC )
endif( NOT ITA_CORE_LIBS_BUILD_STATIC )
# linker # linker
......
...@@ -15,22 +15,18 @@ ...@@ -15,22 +15,18 @@
* ---------------------------------------------------------------- * ----------------------------------------------------------------
* *
*/ */
// $Id: ITABaseDefinitions.h 2900 2012-09-17 08:42:42Z fwefers $
#ifndef INCLUDE_WATCHER_ITA_STREAMING_DEFINITIONS #ifndef INCLUDE_WATCHER_ITA_STREAMING_DEFINITIONS
#define INCLUDE_WATCHER_ITA_STREAMING_DEFINITIONS #define INCLUDE_WATCHER_ITA_STREAMING_DEFINITIONS
// Import-/Export-Konventionen fr die Bibliothek definieren #if ( defined WIN32 ) && !( defined ITA_STREAMING_STATIC )
#ifdef ITA_STREAMING_DLL #ifdef ITA_STREAMING_EXPORT
// Dynamische Bibliothek #define ITA_STREAMING_API __declspec( dllexport )
#ifdef ITA_STREAMING_EXPORT
#define ITA_STREAMING_API __declspec(dllexport)
#else
#define ITA_STREAMING_API __declspec(dllimport)
#endif
#else #else
// Statische Bibliothek #define ITA_STREAMING_API __declspec( dllimport )
#define ITA_STREAMING_API #endif
#else
#define ITA_STREAMING_API
#endif #endif
#endif // INCLUDE_WATCHER_ITA_STREAMING_DEFINITIONS #endif // INCLUDE_WATCHER_ITA_STREAMING_DEFINITIONS
...@@ -10,7 +10,11 @@ endif() ...@@ -10,7 +10,11 @@ endif()
vista_use_package( ITAStreaming REQUIRED FIND_DEPENDENCIES ) vista_use_package( ITAStreaming REQUIRED FIND_DEPENDENCIES )
add_definitions( -DITA_STREAMING_DLL )
if( ITA_CORE_LIBS_BUILD_STATIC AND DEFINED ITA_CORE_LIBS_BUILD_STATIC )
add_definitions( -DITA_STREAMING_STATIC -DITA_BASE_STATIC )
endif( ITA_CORE_LIBS_BUILD_STATIC AND DEFINED ITA_CORE_LIBS_BUILD_STATIC )
add_executable( StreamingComponentTest StreamingComponentTest.cpp ) add_executable( StreamingComponentTest StreamingComponentTest.cpp )
target_link_libraries( StreamingComponentTest ${VISTA_USE_PACKAGE_LIBRARIES} ) target_link_libraries( StreamingComponentTest ${VISTA_USE_PACKAGE_LIBRARIES} )
......
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