CMakeLists.txt 2.37 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


# includes
include_directories( "include" )


# sources
Dipl.-Ing. Jonas Stienen's avatar
Dipl.-Ing. Jonas Stienen committed
18 19 20 21 22 23 24 25
set( ITAPropagationModelsHeader
	"include/ITAPropagationModels/Base.h"
	"include/ITAPropagationModels/Definitions.h"
	"include/ITAPropagationModels/FilterEngine.h"
	"include/ITAPropagationModels/FilterGenerator.h"
	"include/ITAPropagationModels/Kirchhoff.h"
	"include/ITAPropagationModels/Svensson.h"
	"include/ITAPropagationModels/UTD.h"
Dipl.-Ing. Jonas Stienen's avatar
Dipl.-Ing. Jonas Stienen committed
26
	)
Dipl.-Ing. Jonas Stienen's avatar
Dipl.-Ing. Jonas Stienen committed
27 28 29 30 31 32
set( ITAPropagationModelsSources
	"src/ITAPropagationModels/FilterEngine.cpp"
	"src/ITAPropagationModels/FilterGenerator.cpp"
	"src/ITAPropagationModels/Kirchhoff.cpp"
	"src/ITAPropagationModels/Svensson.cpp"
	"src/ITAPropagationModels/UTD.cpp"
Dipl.-Ing. Jonas Stienen's avatar
Dipl.-Ing. Jonas Stienen committed
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
)


# 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
Dipl.-Ing. Jonas Stienen's avatar
Dipl.-Ing. Jonas Stienen committed
60
add_library( ITAPropagationModels ${ITAPropagationModelsHeader} ${ITAPropagationModelsSources} )
Dipl.-Ing. Jonas Stienen's avatar
Dipl.-Ing. Jonas Stienen committed
61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85
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( )