Back to home page

EIC code displayed by LXR

 
 

    


Warning, /npsim/src/tools/CMakeLists.txt is written in an unsupported language. File is not indexed.

0001 cmake_minimum_required(VERSION 3.12 FATAL_ERROR)
0002 
0003 # CMP0074: find_package() uses <PackageName>_ROOT variables
0004 cmake_policy(SET CMP0074 NEW)
0005 
0006 include(GNUInstallDirs)
0007 
0008 # Required dependencies
0009 find_package(fmt REQUIRED)
0010 find_package(DD4hep REQUIRED COMPONENTS DDCore DDRec)
0011 find_package(ROOT REQUIRED COMPONENTS Geom GenVector Gpad Hist MathCore)
0012 include(${ROOT_USE_FILE})
0013 
0014 # Optional dependencies
0015 find_package(spdlog)
0016 
0017 # ------------------------------------
0018 # npdet_fields
0019 # ------------------------------------
0020 set(exe_name npdet_fields)
0021 add_executable(${exe_name} src/${exe_name}.cxx src/settings.cxx)
0022 target_include_directories(${exe_name}
0023   PRIVATE include )
0024 target_compile_features(${exe_name}
0025   PUBLIC cxx_std_20
0026   PUBLIC cxx_auto_type
0027   PUBLIC cxx_trailing_return_types
0028   PRIVATE cxx_variadic_templates )
0029 target_link_libraries(${exe_name}
0030   PUBLIC DD4hep::DDCore ROOT::Core ROOT::Hist ROOT::Gpad)
0031 install(TARGETS ${exe_name}
0032   EXPORT NPDetTargets
0033   RUNTIME DESTINATION bin )
0034 
0035 
0036 # ------------------------------------
0037 # npdet_to_step
0038 # ------------------------------------
0039 # npdet_to_step needs the (formerly part of ROOT) GeoCad library
0040 if(TARGET GeoCad)
0041   set(exe_name npdet_to_step)
0042   add_executable(${exe_name} src/${exe_name}.cxx src/settings.cxx src/npdet_to_step_cli.cxx)
0043   target_include_directories(${exe_name}
0044     PRIVATE include )
0045   target_compile_features(${exe_name}
0046     PUBLIC cxx_auto_type
0047     PUBLIC cxx_trailing_return_types
0048     PRIVATE cxx_variadic_templates
0049     PRIVATE cxx_std_20)
0050   target_link_libraries(${exe_name}
0051     PUBLIC DD4hep::DDCore ROOT::Core GeoCad)
0052   install(TARGETS ${exe_name}
0053     EXPORT NPDetTargets
0054     RUNTIME DESTINATION bin )
0055 else()
0056   message(WARNING "npdet_to_step will not be built")
0057 endif()
0058 
0059 # ------------------------------------
0060 # npdet_to_teve
0061 # ------------------------------------
0062 if(TARGET ROOT::Eve)
0063   set(exe_name npdet_to_teve)
0064   add_executable(${exe_name} src/${exe_name}.cxx src/settings.cxx)
0065   target_include_directories(${exe_name}
0066     PRIVATE include )
0067   target_compile_features(${exe_name}
0068     PUBLIC cxx_std_20
0069     PUBLIC cxx_auto_type
0070     PUBLIC cxx_trailing_return_types
0071     PRIVATE cxx_variadic_templates
0072     )
0073   target_link_libraries(${exe_name}
0074     PUBLIC DD4hep::DDCore ROOT::Core ROOT::Eve ROOT::Imt)
0075   install(TARGETS ${exe_name}
0076     EXPORT NPDetTargets
0077     RUNTIME DESTINATION bin )
0078 else()
0079   message(WARNING "npdet_to_teve will not be built")
0080 endif()
0081 
0082 # ------------------------------------
0083 # npdet_mat_budget
0084 # ------------------------------------
0085 set(exe_name npdet_mat_budget)
0086 add_executable(${exe_name} src/${exe_name}.cxx src/settings.cxx)
0087 target_include_directories(${exe_name}
0088   PRIVATE include )
0089 target_compile_features(${exe_name}
0090   PUBLIC cxx_std_20
0091   PUBLIC cxx_auto_type
0092   PUBLIC cxx_trailing_return_types
0093   PRIVATE cxx_variadic_templates
0094   )
0095 target_link_libraries(${exe_name}
0096   PUBLIC DD4hep::DDCore DD4hep::DDRec ROOT::Core fmt::fmt)
0097 install(TARGETS ${exe_name}
0098   EXPORT NPDetTargets
0099   RUNTIME DESTINATION bin )
0100 
0101 if(BUILD_TESTING)
0102   add_subdirectory(tests)
0103 endif()
0104 
0105 # ------------------------------------
0106 # dd_web_display
0107 # ------------------------------------
0108 if(TARGET ROOT::RHTTP)
0109  set(exe_name dd_web_display)
0110   add_executable(${exe_name} src/${exe_name}.cxx src/settings.cxx)
0111   target_include_directories(${exe_name}
0112     PRIVATE include )
0113   target_compile_features(${exe_name}
0114     PUBLIC cxx_auto_type
0115     PUBLIC cxx_trailing_return_types
0116     PRIVATE cxx_variadic_templates
0117     PUBLIC cxx_std_20
0118     )
0119   target_link_libraries(${exe_name}
0120     PUBLIC DD4hep::DDCore ROOT::Core ROOT::RHTTP ROOT::Net fmt::fmt spdlog::spdlog)
0121   install(TARGETS ${exe_name}
0122     EXPORT NPDetTargets
0123     RUNTIME DESTINATION bin )
0124 else()
0125   message(WARNING "dd_web_display will not be built")
0126 endif()
0127 
0128 # ------------------------------------
0129 # npdet_to_dot
0130 # ------------------------------------
0131 set(exe_name npdet_to_dot)
0132 add_executable(${exe_name} src/${exe_name}.cxx)
0133 target_include_directories(${exe_name}
0134   PRIVATE include)
0135 target_compile_features(${exe_name}
0136   PUBLIC cxx_std_17
0137   PUBLIC cxx_auto_type
0138   PUBLIC cxx_trailing_return_types
0139   PRIVATE cxx_variadic_templates)
0140 target_link_libraries(${exe_name}
0141   PUBLIC DD4hep::DDCore ROOT::Core ROOT::Geom)
0142 install(TARGETS ${exe_name}
0143   EXPORT NPDetTargets
0144   RUNTIME DESTINATION bin)
0145 
0146 # ------------------------------------
0147 # npdet_info
0148 # ------------------------------------
0149 set(exe_name npdet_info)
0150 add_executable(${exe_name} src/${exe_name}.cxx )
0151 target_include_directories(${exe_name}
0152   PRIVATE include )
0153 target_compile_features(${exe_name}
0154   PUBLIC cxx_auto_type
0155   PUBLIC cxx_trailing_return_types
0156   PRIVATE cxx_variadic_templates
0157   PUBLIC cxx_std_20)
0158 target_link_libraries(${exe_name}
0159   PUBLIC DD4hep::DDCore ROOT::Core ROOT::Hist ROOT::GenVector fmt::fmt)
0160 install(TARGETS ${exe_name}
0161   EXPORT NPDetTargets
0162   RUNTIME DESTINATION bin )