Renewing cmake config v2

parent d442eaee
......@@ -10,11 +10,6 @@ vista_use_package( ITABASE REQUIRED FIND_DEPENDENCIES )
vista_use_package( ITAFFT REQUIRED FIND_DEPENDENCIES )
vista_use_package( TBB REQUIRED )
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 )
# includes
include_directories( "include" )
......@@ -39,25 +34,20 @@ set( ITAConvolutionSources
# 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_CONVOLUTION_EXPORT )
else( NOT ITA_CORE_LIBS_BUILD_STATIC )
add_definitions( -DITA_FFT_STATIC -DITA_BASE_STATIC -DITA_CONVOLUTION_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 )
set( BUILD_SHARED_LIBS OFF )
endif( NOT ITA_CORE_LIBS_BUILD_STATIC )
else( )
add_definitions( -DITA_CONVOLUTION_STATIC -DITA_FFT_STATIC -DITA_BASE_STATIC -DITA_DATA_SOURCES_STATIC )
endif( )
# linker
add_library( ITAConvolution ${ITAConvolutionHeader} ${ITAConvolutionSources} )
target_link_libraries( ITAConvolution ${VISTA_USE_PACKAGE_LIBRARIES} )
set( BUILD_SHARED_LIBS ${BUILD_SHARED_LIBS_TEMP} )
# configure
vista_configure_lib( ITAConvolution )
......@@ -70,5 +60,7 @@ set_property( TARGET ITAConvolution PROPERTY FOLDER "ITACoreLibs" )
# tests
set( ITACONVOLUTION_COMMON_BUILD TRUE )
add_subdirectory( "${CMAKE_CURRENT_SOURCE_DIR}/tests" )
if( ITA_CORE_LIBS_WITH_TESTS )
set( ITACONVOLUTION_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