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 3f668cd3
......@@ -9,6 +9,10 @@ include( VistaCommon )
vista_use_package( ITABase REQUIRED FIND_DEPENDENCIES )
vista_use_package( ITAGeo REQUIRED FIND_DEPENDENCIES )
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_DIFFRACTION_WITH_GENETIC_ALGORITHM )
set( ITA_DIFFRACTION_WITH_GENETIC_ALGORITHM ON CACHE BOOL "Build with genetic path search algorithm" )
endif( NOT DEFINED ITA_DIFFRACTION_WITH_GENETIC_ALGORITHM )
......@@ -47,8 +51,13 @@ if( ITA_DIFFRACTION_WITH_GENETIC_ALGORITHM )
endif( ITA_DIFFRACTION_WITH_GENETIC_ALGORITHM )
# compiler
add_definitions( -DITA_BASE_DLL -DITA_GEO_DLL -DITA_DIFFRACTION_DLL -DITA_DIFFRACTION_EXPORT -D_USE_MATH_DEFINES -DNOMINMAX )
# compiler settings
add_definitions( -D_USE_MATH_DEFINES -DNOMINMAX )
if( NOT ITA_CORE_LIBS_BUILD_STATIC )
add_definitions( -DITA_DIFFRACTION_EXPORT )
else( NOT ITA_CORE_LIBS_BUILD_STATIC )
add_definitions( -DITA_BASE_STATIC -ITA_GEO_STATIC -DITA_DIFFRACTION_STATIC )
endif( NOT ITA_CORE_LIBS_BUILD_STATIC )
# linker
......
......@@ -15,19 +15,18 @@
* ----------------------------------------------------------------
*
*/
// $Id: ITADiffractionDefinitions.h 2395 2012-04-20 06:58:52Z stienen $
#ifndef INCLUDE_WATCHER_ITA_DIFFRACTION_DEFINITIONS
#define INCLUDE_WATCHER_ITA_DIFFRACTION_DEFINITIONS
#ifdef ITA_DIFFRACTION_DLL
#ifdef ITA_DIFFRACTION_EXPORT
#define ITA_DIFFRACTION_API __declspec( dllexport )
#else
#define ITA_DIFFRACTION_API __declspec( dllimport )
#endif
#if ( defined WIN32 ) && !( defined ITA_DIFFRACTION_STATIC )
#ifdef ITA_DIFFRACTION_EXPORT
#define ITA_DIFFRACTION_API __declspec( dllexport )
#else
#define ITA_DIFFRACTION_API __declspec( dllimport )
#endif
#else
#define ITA_DIFFRACTION_API
#define ITA_DIFFRACTION_API
#endif
#endif // INCLUDE_WATCHER_ITA_DIFFRACTION_DEFINITIONS
......@@ -11,8 +11,9 @@ endif()
vista_use_package( ITABase REQUIRED FIND_DEPENDENCIES )
vista_use_package( ITADiffraction REQUIRED FIND_DEPENDENCIES )
add_definitions( -DITA_BASE_DLL -DITA_GEO_DLL -DITA_DIFFRACTION_DLL )
if( ITA_CORE_LIBS_BUILD_STATIC AND DEFINED ITA_CORE_LIBS_BUILD_STATIC )
add_definitions( -DITA_BASE_STATIC -DITA_DIFFRACTION_STATIC -DITA_GEO_STATIC )
endif( ITA_CORE_LIBS_BUILD_STATIC AND DEFINED ITA_CORE_LIBS_BUILD_STATIC )
add_executable( KesselLoudspeakerCabinet KesselLoudspeakerCabinet.cpp )
target_link_libraries( KesselLoudspeakerCabinet ${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