Simplifying cmake configuration

parent ceec578d
......@@ -5,23 +5,6 @@ list( APPEND CMAKE_MODULE_PATH "$ENV{VISTA_CMAKE_COMMON}" )
include( VistaCommon )
if( NOT DEFINED ITA_VABASE_WITH_TESTS )
set( ITA_VABASE_WITH_TESTS OFF CACHE BOOL "Build VABase with tests" )
endif( NOT DEFINED ITA_VABASE_WITH_TESTS )
if( NOT DEFINED ITA_VA_BUILD_STATIC )
set( ITA_VA_BUILD_STATIC OFF CACHE BOOL "Build static VA libs" )
endif( NOT DEFINED ITA_VA_BUILD_STATIC )
if( NOT DEFINED ITA_VABASE_INSTALL_WITH_DLLS )
set( ITA_VABASE_INSTALL_WITH_DLLS ON CACHE BOOL "Install VABase with depending DLLs (use this switch with care)" )
endif( NOT DEFINED ITA_VABASE_INSTALL_WITH_DLLS )
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 )
vista_use_package( VistaCoreLibs REQUIRED COMPONENTS VistaInterProcComm )
......@@ -31,16 +14,11 @@ include( "src/_SourceFiles.cmake" )
include_directories( "include" )
if( NOT ITA_VA_BUILD_STATIC )
if( BUILD_SHARED_LIBS )
add_definitions( -DVABASE_EXPORT )
else( NOT ITA_VA_BUILD_STATIC )
else( )
add_definitions( -VABASE_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 )
endif( NOT ITA_VA_BUILD_STATIC )
endif( )
if( ITA_VISTA_BUILD_STATIC )
add_definitions( -DVISTAINTERPROCCOMM_STATIC )
......@@ -49,8 +27,6 @@ endif( ITA_VISTA_BUILD_STATIC )
add_library( VABase "${ProjectSources}" )
target_link_libraries( VABase ${VISTA_USE_PACKAGE_LIBRARIES} )
set( BUILD_SHARED_LIBS ${BUILD_SHARED_LIBS_TEMP} )
# configure
vista_configure_lib( VABase )
......@@ -61,13 +37,9 @@ vista_create_default_info_file( VABase )
set_property( TARGET VABase PROPERTY FOLDER "VA" )
if( ITA_VABASE_INSTALL_WITH_DLLS OR ITA_VA_INSTALL_WITH_DLLS )
vista_install_all_dlls( bin )
endif()
# tests
if( ITA_VA_WITH_TESTS OR ITA_VABASE_WITH_TESTS )
if( ITA_VA_WITH_TESTS )
set( VABASE_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