Warning, /algorithms/core/CMakeLists.txt is written in an unsupported language. File is not indexed.
0001 # SPDX-License-Identifier: LGPL-3.0-or-later
0002 # Copyright (C) 2022 Wouter Deconinck, Sylvester Joosten
0003
0004 ################################################################################
0005 # Package: algorithms core utilities
0006 ################################################################################
0007
0008 set(SUBDIR "core")
0009 set(LIBRARY "${SUBDIR}")
0010 set(TARGETS ${TARGETS} ${LIBRARY} PARENT_SCOPE)
0011
0012 file(GLOB SRC CONFIGURE_DEPENDS src/*.cpp)
0013
0014 add_library(${LIBRARY} SHARED ${SRC})
0015 add_library(algorithms::${LIBRARY} ALIAS ${LIBRARY})
0016 target_link_libraries(${LIBRARY}
0017 PUBLIC
0018 EDM4HEP::edm4hep
0019 EDM4EIC::edm4eic
0020 DD4hep::DDRec
0021 Microsoft.GSL::GSL
0022 fmt::fmt)
0023 target_include_directories(${LIBRARY}
0024 PUBLIC
0025 $<BUILD_INTERFACE:${PROJECT_SOURCE_DIR}/${SUBDIR}/include>
0026 $<INSTALL_INTERFACE:${CMAKE_INSTALL_INCLUDEDIR}>)
0027 set_target_properties(${LIBRARY} PROPERTIES
0028 OUTPUT_NAME algo${SUBDIR}
0029 VERSION ${PROJECT_VERSION}
0030 SOVERSION ${PROJECT_VERSION_MAJOR}.${PROJECT_VERSION_MINOR})
0031
0032 install(TARGETS ${LIBRARY}
0033 EXPORT algorithmsCoreTargets
0034 RUNTIME DESTINATION "${CMAKE_INSTALL_BINDIR}" COMPONENT bin
0035 LIBRARY DESTINATION "${CMAKE_INSTALL_LIBDIR}" COMPONENT shlib
0036 ARCHIVE DESTINATION "${CMAKE_INSTALL_LIBDIR}" COMPONENT lib
0037 INCLUDES DESTINATION "${CMAKE_INSTALL_INCLUDEDIR}")
0038
0039 install(DIRECTORY ${PROJECT_SOURCE_DIR}/${SUBDIR}/include/algorithms
0040 DESTINATION ${CMAKE_INSTALL_INCLUDEDIR} COMPONENT dev)
0041
0042 # TODO: Testing
0043 #if(BUILD_TESTING)
0044 # enable_testing()
0045 #endif()
0046