CMakeLists.txt 1.17 KB
Newer Older
Jonas Stienen's avatar
Jonas Stienen committed
1 2 3 4 5 6 7
cmake_minimum_required( VERSION 2.8 )
project( VABase )

list( APPEND CMAKE_MODULE_PATH "$ENV{VISTA_CMAKE_COMMON}" )

include( VistaCommon )

8
vista_use_package( VistaCoreLibs REQUIRED COMPONENTS VistaInterProcComm FIND_DEPENDENCIES )
Jonas Stienen's avatar
Jonas Stienen committed
9 10 11 12 13 14 15 16


# Including the source files of all source subfolders recursively
include( "include/_SourceFiles.cmake" )
include( "src/_SourceFiles.cmake" )

include_directories( "include" )

17
if( BUILD_SHARED_LIBS )
18
	add_definitions( -DVABASE_EXPORT )
19
else( )
Marco Berzborn's avatar
Marco Berzborn committed
20
    add_definitions( -DVABASE_STATIC )
21
endif( )	
Jonas Stienen's avatar
Jonas Stienen committed
22

23
if( ITA_VISTA_BUILD_STATIC )
24 25
	add_definitions( -DVISTAINTERPROCCOMM_STATIC -DVISTA_STATIC )
endif( )
26

27 28 29 30 31
if( NOT WIN32 )
	add_definitions( -std=gnu++11 )
endif( )

# linker
Jonas Stienen's avatar
Jonas Stienen committed
32 33 34 35 36 37 38 39 40 41 42 43 44 45 46
add_library( VABase "${ProjectSources}" )
target_link_libraries( VABase ${VISTA_USE_PACKAGE_LIBRARIES} )


# configure
vista_configure_lib( VABase )
vista_install( VABase )
set( VABASE_INCLUDE_OUTDIR "${CMAKE_CURRENT_SOURCE_DIR}/include" )
vista_create_cmake_configs( VABase )
vista_create_default_info_file( VABase )

set_property( TARGET VABase PROPERTY FOLDER "VA" )


# tests
47
if( ITA_VA_WITH_TESTS )
Dipl.-Ing. Jonas Stienen's avatar
Style  
Dipl.-Ing. Jonas Stienen committed
48
	set( VABASE_COMMON_BUILD TRUE )
49 50
	add_subdirectory( "${CMAKE_CURRENT_SOURCE_DIR}/tests" )
endif()