-
ralfulrich authoredralfulrich authored
CMakeLists.txt 1.33 KiB
set (GEOMETRY_SOURCES CoordinateSystem.cc)
set (GEOMETRY_HEADERS Vector.h Point.h Sphere.h CoordinateSystem.h)
add_library (CORSIKAgeometry STATIC ${GEOMETRY_SOURCES})
set_target_properties (CORSIKAgeometry PROPERTIES VERSION ${PROJECT_VERSION})
set_target_properties (CORSIKAgeometry PROPERTIES SOVERSION 1)
set_target_properties (CORSIKAgeometry PROPERTIES PUBLIC_HEADER "${GEOMETRY_HEADERS}")
# target dependencies on other libraries (also header only)
target_link_libraries (CORSIKAgeometry CORSIKAunits)
target_include_directories (CORSIKAgeometry PRIVATE ${EIGEN3_INCLUDE_DIR})
target_include_directories (CORSIKAgeometry INTERFACE ${EIGEN3_INCLUDE_DIR})
target_include_directories (CORSIKAgeometry INTERFACE $<BUILD_INTERFACE:${PROJECT_SOURCE_DIR}/Framework>
$<INSTALL_INTERFACE:include/Framework>
)
install (TARGETS CORSIKAgeometry
LIBRARY DESTINATION lib
ARCHIVE DESTINATION lib
PUBLIC_HEADER DESTINATION include/Geometry)
# code testing
add_executable (testGeometry testGeometry.cc)
target_link_libraries (testGeometry CORSIKAgeometry CORSIKAunits CORSIKAthirdparty) # for catch2
add_test (NAME testGeometry COMMAND testGeometry -o report.xml -r junit)