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.
Also, adding License and Readme.
parent 2c4aa44f
......@@ -11,6 +11,10 @@ vista_use_package( ITABase REQUIRED FIND_DEPENDENCIES )
vista_use_package( ASIO QUIET )
vista_use_package( Portaudio QUIET )
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 )
set( ITA_DATA_SOURCE_WITH_INTEGRATED_ASIO ${VASIO_FOUND} CACHE BOOL "Build with ASIO support" )
endif( NOT DEFINED ITA_DATA_SOURCE_WITH_INTEGRATED_ASIO )
......@@ -81,12 +85,16 @@ if( VPORTAUDIO_FOUND AND ITA_DATA_SOURCE_WITH_INTEGRATED_PORTAUDIO )
endif( VPORTAUDIO_FOUND AND ITA_DATA_SOURCE_WITH_INTEGRATED_PORTAUDIO )
# compiler
if( WIN32 )
add_definitions( -DITA_BASE_DLL -DITA_DATA_SOURCES_DLL -DITA_DATA_SOURCES_EXPORT )
else( WIN32 )
# compiler settings
if( NOT ITA_CORE_LIBS_BUILD_STATIC )
add_definitions( -DITA_DATA_SOURCES_EXPORT )
else( NOT ITA_CORE_LIBS_BUILD_STATIC )
add_definitions( -DITA_BASE_STATIC -DITA_DATA_SOURCES_STATIC )
endif( NOT ITA_CORE_LIBS_BUILD_STATIC )
if( NOT WIN32 )
add_definitions( -std=c++11 )
endif( WIN32)
endif( NOT WIN32)
# linker
......
Copyright 2015-2016 Institute of Technical Acoustics, RWTH Aachen University. Any usage and distribution is prohibited, unless explicitly granted by the authors.
\ No newline at end of file
......@@ -4,5 +4,4 @@ ITADataSources is a C++ library for component-oriented audio streaming providing
### License
Copyright 2015-2016 Institute of Technical Acoustics, RWTH Aachen University
Any usage and distribution is prohibited, unless explicitly granted by the authors.
\ No newline at end of file
See [LICENSE](LICENSE.md) file.
......@@ -15,7 +15,6 @@
* ----------------------------------------------------------------
*
*/
// $Id: ITABufferDataSink.h 2900 2012-09-17 08:42:42Z stienen $
#ifndef INCLUDE_WATCHER_ITA_BUFFER_DATA_SINK
#define INCLUDE_WATCHER_ITA_BUFFER_DATA_SINK
......
......@@ -15,19 +15,18 @@
* ----------------------------------------------------------------
*
*/
// $Id: ITADataSourceDefinitions.h 2900 2012-09-17 08:42:42Z stienen $
#ifndef INCLUDE_WATCHER_ITA_DATA_SOURCES_DEFINITIONS
#define INCLUDE_WATCHER_ITA_DATA_SOURCES_DEFINITIONS
#ifdef ITA_DATA_SOURCES_DLL
#ifdef ITA_DATA_SOURCES_EXPORT
#define ITA_DATA_SOURCES_API __declspec(dllexport)
#else
#define ITA_DATA_SOURCES_API __declspec(dllimport)
#endif
#if ( defined WIN32 ) && !( defined ITA_DATA_SOURCES_STATIC )
#ifdef ITA_DATA_SOURCES_EXPORT
#define ITA_DATA_SOURCES_API __declspec( dllexport )
#else
#define ITA_DATA_SOURCES_API __declspec( dllimport )
#endif
#else
#define ITA_DATA_SOURCES_API
#define ITA_DATA_SOURCES_API
#endif
#endif // INCLUDE_WATCHER_ITA_DATA_SOURCES_DEFINITIONS
......@@ -14,7 +14,9 @@ if( VASIO_FOUND AND ITA_DATA_SOURCE_WITH_INTEGRATED_ASIO )
add_subdirectory( ITAAsioTests )
endif( VASIO_FOUND AND ITA_DATA_SOURCE_WITH_INTEGRATED_ASIO )
add_definitions( -DITA_DATA_SOURCES_DLL )
if( ITA_CORE_LIBS_BUILD_STATIC AND DEFINED ITA_CORE_LIBS_BUILD_STATIC )
add_definitions( -DITA_BASE_STATIC -DITA_DATA_SOURCES_STATIC )
endif( ITA_CORE_LIBS_BUILD_STATIC AND DEFINED ITA_CORE_LIBS_BUILD_STATIC )
add_executable( BufferDataSourceTest BufferDataSourceTest.cpp )
......
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