Warning, /jana2/src/libraries/JANA/CMakeLists.txt is written in an unsupported language. File is not indexed.
0001
0002
0003 # Everything else happens below
0004 set(JANA2_SOURCES
0005
0006 JApplication.cc
0007 JEvent.cc
0008 JEventSource.cc
0009 JFactory.cc
0010 JFactorySet.cc
0011 JMultifactory.cc
0012 JService.cc
0013 JVersion.cc
0014 JEvent.cc
0015 JLogger.cc
0016
0017 Engine/JExecutionEngine.cc
0018
0019 Topology/JArrow.cc
0020 Topology/JEventSourceArrow.cc
0021 Topology/JEventMapArrow.cc
0022 Topology/JEventTapArrow.cc
0023 Topology/JTopologyBuilder.cc
0024
0025 Services/JComponentManager.cc
0026 Services/JParameterManager.cc
0027 Services/JPluginLoader.cc
0028 Services/JWiringService.cc
0029
0030 Components/JComponentSummary.cc
0031
0032 Utils/JCpuInfo.cc
0033 Utils/JProcessorMapping.cc
0034 Utils/JBenchUtils.cc
0035 Utils/JStringification.cc
0036 Utils/JAutoActivator.cc
0037 Utils/JTablePrinter.cc
0038 Utils/JCallGraphRecorder.cc
0039 Utils/JInspector.cc
0040 Utils/JApplicationInspector.cc
0041 Utils/JBacktrace.cc
0042
0043 Calibrations/JCalibration.cc
0044 Calibrations/JCalibrationFile.cc
0045 Calibrations/JResource.cc
0046
0047 Geometry/JGeometryManager.cc
0048 Geometry/JGeometryXML.cc
0049
0050 CLI/JBenchmarker.cc
0051 CLI/JSignalHandler.cc
0052 CLI/JMain.cc
0053
0054 Compatibility/JStreamLog.cc
0055 Compatibility/JStreamLogBuffer.cc
0056 )
0057
0058 if (${USE_PODIO})
0059 list(APPEND JANA2_SOURCES
0060 Podio/JFactoryPodioT.cc
0061 )
0062 endif()
0063
0064 if (NOT ${USE_XERCES})
0065 message(STATUS "Skipping support for libJANA's JGeometryXML because USE_XERCES=Off")
0066 endif()
0067
0068 add_library(jana2 OBJECT ${JANA2_SOURCES})
0069
0070 find_package(Threads REQUIRED)
0071 set(THREADS_PREFER_PTHREAD_FLAG ON)
0072 target_link_libraries(jana2 PUBLIC ${CMAKE_DL_LIBS} Threads::Threads)
0073 target_link_libraries(jana2 PRIVATE VendoredTomlPlusPlus)
0074 target_link_libraries(jana2 PRIVATE VendoredMD5) # To pull in the header file
0075
0076 if (${USE_PODIO})
0077 target_link_libraries(jana2 PUBLIC podio::podio podio::podioRootIO ${ROOT_LIBRARIES})
0078 elseif (${USE_ROOT})
0079 target_link_libraries(jana2 PUBLIC ${ROOT_LIBRARIES})
0080 endif()
0081
0082
0083 # static library, always there
0084 add_library(jana2_static_lib STATIC $<TARGET_OBJECTS:jana2> $<TARGET_OBJECTS:VendoredMD5>)
0085 set_target_properties(jana2_static_lib PROPERTIES PREFIX "lib" OUTPUT_NAME "JANA")
0086
0087 target_include_directories(jana2_static_lib PUBLIC $<INSTALL_INTERFACE:include>)
0088 target_link_libraries(jana2_static_lib PUBLIC ${CMAKE_DL_LIBS} Threads::Threads)
0089 target_link_libraries(jana2_static_lib PUBLIC VendoredTomlPlusPlus)
0090
0091 if (${USE_PODIO})
0092 target_link_libraries(jana2_static_lib PUBLIC podio::podio podio::podioRootIO ${ROOT_LIBRARIES})
0093 elseif (${USE_ROOT})
0094 target_link_libraries(jana2_static_lib PUBLIC ${ROOT_LIBRARIES})
0095 endif()
0096 install(TARGETS jana2_static_lib EXPORT jana2_targets DESTINATION lib)
0097
0098 # optionally build shared lib
0099 if (BUILD_SHARED_LIBS)
0100 message(STATUS "Building both shared and static libraries")
0101 add_library(jana2_shared_lib SHARED $<TARGET_OBJECTS:jana2> $<TARGET_OBJECTS:VendoredMD5>)
0102 set_target_properties(jana2_shared_lib PROPERTIES PREFIX "lib" OUTPUT_NAME "JANA")
0103
0104 target_include_directories(jana2_shared_lib PUBLIC $<INSTALL_INTERFACE:include>)
0105 target_link_libraries(jana2_shared_lib PUBLIC ${CMAKE_DL_LIBS} Threads::Threads)
0106 target_link_libraries(jana2_shared_lib PUBLIC VendoredTomlPlusPlus)
0107
0108 if (${USE_PODIO})
0109 target_link_libraries(jana2_shared_lib PUBLIC podio::podio podio::podioRootIO ${ROOT_LIBRARIES})
0110 elseif (${USE_ROOT})
0111 target_link_libraries(jana2_shared_lib PUBLIC ${ROOT_LIBRARIES})
0112 endif()
0113
0114 install(TARGETS jana2_shared_lib EXPORT jana2_targets DESTINATION lib)
0115 set(INSTALL_RPATH_USE_LINK_PATH True)
0116 else()
0117 message(STATUS "Building static library only")
0118 endif()
0119
0120
0121 # Install "public" header files
0122
0123 file(GLOB jana_headers "*.h*")
0124 file(GLOB jana_engine_headers "Engine/*.h*")
0125 file(GLOB jana_services_headers "Services/*.h*")
0126 file(GLOB jana_streaming_headers "Streaming/*.h*")
0127 file(GLOB jana_utils_headers "Utils/*.h*")
0128 file(GLOB jana_calibs_headers "Calibrations/*.h*")
0129 file(GLOB jana_geometry_headers "Geometry/*.h*")
0130 file(GLOB jana_cli_headers "CLI/*.h*")
0131 file(GLOB jana_compat_headers "Compatibility/*.h*")
0132 file(GLOB jana_podio_headers "Podio/*.h*")
0133 file(GLOB jana_component_headers "Components/*.h*")
0134 file(GLOB jana_topology_headers "Topology/*.h*")
0135
0136 install(FILES ${jana_headers} DESTINATION include/JANA)
0137 install(FILES ${jana_engine_headers} DESTINATION include/JANA/Engine)
0138 install(FILES ${jana_services_headers} DESTINATION include/JANA/Services)
0139 install(FILES ${jana_streaming_headers} DESTINATION include/JANA/Streaming)
0140 install(FILES ${jana_utils_headers} DESTINATION include/JANA/Utils)
0141 install(FILES ${jana_calibs_headers} DESTINATION include/JANA/Calibrations)
0142 install(FILES ${jana_geometry_headers} DESTINATION include/JANA/Geometry)
0143 install(FILES ${jana_cli_headers} DESTINATION include/JANA/CLI)
0144 install(FILES ${jana_compat_headers} DESTINATION include/JANA/Compatibility)
0145 install(FILES ${jana_component_headers} DESTINATION include/JANA/Components)
0146 install(FILES ${jana_topology_headers} DESTINATION include/JANA/Topology)
0147
0148 if (${USE_PODIO})
0149 install(FILES ${jana_podio_headers} DESTINATION include/JANA/Podio)
0150 endif()
0151
0152
0153
0154
0155
0156