CMakeLists.txt 2.29 KB
Newer Older
1 2 3 4 5 6 7 8 9 10
cmake_minimum_required( VERSION 2.8 )

project( ITAPropagationModels )

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

# dependencies
vista_use_package( ITABase REQUIRED FIND_DEPENDENCIES )
vista_use_package( ITAGeo REQUIRED FIND_DEPENDENCIES )
Dipl.-Ing. Jonas Stienen's avatar
Dipl.-Ing. Jonas Stienen committed
11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84


# includes
include_directories( "include" )


# sources
set( ITAPropagationModelHeader
	"include/ITAPropagationModelsBase.h"
	"include/ITAPropagationModelsDefinitions.h"
	"include/ITADiffractionFilter.h"
	"include/ITAPropagationModelFilterGenerator.h"
	"include/ITAPropagationModelKirchhoff.h"
	"include/ITAPropagationModelSvensson.h"
	"include/ITAPropagationModelUTD.h"
	)
set( ITAPropagationModelSources
	"src/ITAPropagationModelFilterGenerator.cpp"
	"src/ITAPropagationModelKirchhoff.cpp"
	"src/ITAPropagationModelSvensson.cpp"
	"src/ITAPropagationModelUTD.cpp"
)


# preprocessor
if( BUILD_SHARED_LIBS )
	add_definitions( -DITA_PROPAGATION_MODELS_EXPORT )
else( )
	add_definitions( -DITA_PROPAGATION_MODELS_STATIC )
endif( )

if( ITA_CORE_LIBS_BUILD_STATIC )
	add_definitions( -DITA_BASE_STATIC )
endif( )

if( ITA_VISTA_BUILD_STATIC )
	add_definitions( -DVISTABASE_STATIC -DVISTAMATH_STATIC -DVISTAASPECTS_STATIC -DVISTATOOLS_STATIC -DVISTAINTERPROCCOMM_STATIC )
endif( )

if( NOT WIN32 )
	add_definitions( -std=gnu++11 )
endif( )


add_definitions( -D_USE_MATH_DEFINES -DNOMINMAX )


# linker
add_library( ITAPropagationModels ${ITAPropagationModelHeader} ${ITAPropagationModelSources} )
target_link_libraries( ITAPropagationModels ${VISTA_USE_PACKAGE_LIBRARIES} )


# config
vista_configure_lib( ITAPropagationModels )
vista_install( ITAPropagationModels )
set( ITAPROPAGATIONMODELS_INCLUDE_OUTDIR "${CMAKE_CURRENT_SOURCE_DIR}/include" )
vista_create_cmake_configs( ITAPropagationModels )
vista_create_default_info_file( ITAPropagationModels )

set_property( TARGET ITAPropagationModels PROPERTY FOLDER "ITAGeometricalAcoustics" )


# benchmarks
if( ITA_GEOMETRICAL_ACOUSTICS_WITH_BENCHMARKS OR ITA_PROPAGATION_MODELS_WITH_BENCHMARKS )
	set( ITAPROPAGATIONMODELS_COMMON_BUILD TRUE )
	add_subdirectory( "${CMAKE_CURRENT_SOURCE_DIR}/benchmarks" )
endif( )


# tests
if( ITA_GEOMETRICAL_ACOUSTICS_WITH_TESTS OR ITA_PROPAGATION_MODEL_WITH_TESTS )
	set( ITAPROPAGATIONMODELS_COMMON_BUILD TRUE )
	add_subdirectory( "${CMAKE_CURRENT_SOURCE_DIR}/tests" )
endif( )