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_17
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)
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_17)
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_17
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_17
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 # ------------------------------------
0102 # dd_web_display
0103 # ------------------------------------
0104 if(TARGET ROOT::RHTTP)
0105 set(exe_name dd_web_display)
0106 add_executable(${exe_name} src/${exe_name}.cxx src/settings.cxx)
0107 target_include_directories(${exe_name}
0108 PRIVATE include )
0109 target_compile_features(${exe_name}
0110 PUBLIC cxx_auto_type
0111 PUBLIC cxx_trailing_return_types
0112 PRIVATE cxx_variadic_templates
0113 PUBLIC cxx_std_17
0114 )
0115 target_link_libraries(${exe_name}
0116 PUBLIC DD4hep::DDCore ROOT::Core ROOT::RHTTP ROOT::Net fmt::fmt spdlog::spdlog)
0117 install(TARGETS ${exe_name}
0118 EXPORT NPDetTargets
0119 RUNTIME DESTINATION bin )
0120 else()
0121 message(WARNING "dd_web_display will not be built")
0122 endif()
0123
0124 # ------------------------------------
0125 # npdet_info
0126 # ------------------------------------
0127 set(exe_name npdet_info)
0128 add_executable(${exe_name} src/${exe_name}.cxx )
0129 target_include_directories(${exe_name}
0130 PRIVATE include )
0131 target_compile_features(${exe_name}
0132 PUBLIC cxx_auto_type
0133 PUBLIC cxx_trailing_return_types
0134 PRIVATE cxx_variadic_templates
0135 PUBLIC cxx_std_17)
0136 target_link_libraries(${exe_name}
0137 PUBLIC DD4hep::DDCore ROOT::Core ROOT::Hist ROOT::GenVector fmt::fmt)
0138 install(TARGETS ${exe_name}
0139 EXPORT NPDetTargets
0140 RUNTIME DESTINATION bin )