Back to home page

EIC code displayed by LXR

 
 

    


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 # Generate the version header in the build tree (installed below)
0015 configure_file(version.h.in
0016   ${PROJECT_BINARY_DIR}/${SUBDIR}/include/algorithms/version.h
0017   @ONLY)
0018 
0019 add_library(${LIBRARY} SHARED ${SRC})
0020 add_library(algorithms::${LIBRARY} ALIAS ${LIBRARY})
0021 target_link_libraries(${LIBRARY}
0022   PUBLIC
0023     EDM4HEP::edm4hep
0024     EDM4EIC::edm4eic
0025     DD4hep::DDRec
0026     Microsoft.GSL::GSL
0027     fmt::fmt)
0028 target_include_directories(${LIBRARY}
0029   PUBLIC
0030   $<BUILD_INTERFACE:${PROJECT_SOURCE_DIR}/${SUBDIR}/include>
0031   $<BUILD_INTERFACE:${PROJECT_BINARY_DIR}/${SUBDIR}/include>
0032   $<INSTALL_INTERFACE:${CMAKE_INSTALL_INCLUDEDIR}>)
0033 set_target_properties(${LIBRARY} PROPERTIES
0034   OUTPUT_NAME algo${SUBDIR}
0035   VERSION ${PROJECT_VERSION}
0036   SOVERSION ${PROJECT_VERSION_MAJOR}.${PROJECT_VERSION_MINOR})
0037 
0038 install(TARGETS ${LIBRARY}
0039   EXPORT algorithmsCoreTargets
0040   RUNTIME DESTINATION "${CMAKE_INSTALL_BINDIR}" COMPONENT bin
0041   LIBRARY DESTINATION "${CMAKE_INSTALL_LIBDIR}" COMPONENT shlib
0042   ARCHIVE DESTINATION "${CMAKE_INSTALL_LIBDIR}" COMPONENT lib
0043   INCLUDES DESTINATION "${CMAKE_INSTALL_INCLUDEDIR}")
0044 
0045 install(DIRECTORY ${PROJECT_SOURCE_DIR}/${SUBDIR}/include/algorithms
0046 DESTINATION ${CMAKE_INSTALL_INCLUDEDIR} COMPONENT dev)
0047 install(FILES ${PROJECT_BINARY_DIR}/${SUBDIR}/include/algorithms/version.h
0048 DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/algorithms COMPONENT dev)
0049 
0050 if(BUILD_TESTING)
0051   add_subdirectory(tests)
0052 endif()
0053