Warning, /eic-opticks/u4/CMakeLists.txt is written in an unsupported language. File is not indexed.
0001 set(name U4)
0002 set(desc "Geant4 Low Level Utilities")
0003
0004 find_package(Geant4 REQUIRED)
0005 find_package(CLHEP REQUIRED)
0006 find_package(XercesC REQUIRED)
0007
0008 find_package(Custom4 CONFIG) # have to be explicit as Custom4 needed without j/PMTSim
0009 find_package(PMTSim_standalone CONFIG)
0010
0011
0012 set(SOURCES
0013 U4_LOG.cc
0014 U4.cc
0015 U4SolidMaker.cc
0016 U4SolidTree.cc
0017 U4Material.cc
0018 U4VolumeMaker.cc
0019 U4Recorder.cc
0020 U4StepPoint.cc
0021 U4Random.cc
0022 U4SensitiveDetector.cc
0023
0024 U4Debug.cc
0025 U4Scintillation_Debug.cc
0026 U4Cerenkov_Debug.cc
0027 U4Hit_Debug.cc
0028
0029 ShimG4OpAbsorption.cc
0030 ShimG4OpRayleigh.cc
0031 Local_G4Cerenkov_modified.cc
0032 Local_DsG4Scintillation.cc
0033
0034 U4Physics.cc
0035 )
0036
0037 set(OTHER_SOURCES
0038 InstrumentedG4OpBoundaryProcess.cc
0039 )
0040
0041
0042 set(HEADERS
0043 U4_LOG.hh
0044 U4_API_EXPORT.hh
0045 U4.hh
0046 U4ThreeVector.h
0047 U4Hit.h
0048 U4HitGet.h
0049 U4Track.h
0050 U4Stack.h
0051 Deprecated_U4PhotonInfo.h
0052 U4GDML.h
0053 U4Transform.h
0054 U4Tree.h
0055 U4TreeBorder.h
0056 U4Boundary.h
0057 U4NistManager.h
0058
0059 U4App.h
0060 U4VPrimaryGenerator.h
0061
0062 U4SensorIdentifier.h
0063 U4SensorIdentifierDefault.h
0064 U4SensitiveDetector.hh
0065
0066 U4SolidMaker.hh
0067 U4SolidTree.hh
0068
0069 U4Material.hh
0070 U4Mat.h
0071 U4Scint.h
0072
0073 U4Volume.h
0074 U4Surface.h
0075 U4Solid.h
0076 U4Polycone.h
0077 U4MultiUnion.h
0078 U4MaterialPropertiesTable.h
0079 U4MaterialPropertyVector.h
0080
0081 U4VolumeMaker.hh
0082 U4Recorder.hh
0083 U4OpBoundaryProcess.h
0084 U4StepPoint.hh
0085 U4Random.hh
0086
0087 U4Engine.h
0088 U4Touchable.h
0089
0090 U4Navigator.h
0091 U4Simtrace.h
0092
0093 U4Debug.hh
0094 U4Scintillation_Debug.hh
0095 U4Cerenkov_Debug.hh
0096 U4Hit_Debug.hh
0097
0098 ShimG4OpAbsorption.hh
0099 ShimG4OpRayleigh.hh
0100
0101 Local_G4Cerenkov_modified.hh
0102 Local_DsG4Scintillation.hh
0103 U4Physics.hh
0104
0105 U4PMTAccessor.h
0106
0107 U4Process.h
0108 U4PhysicsTable.h
0109 U4PhysicsVector.h
0110 U4MaterialTable.h
0111 U4OpticalSurfaceFinish.h
0112 U4OpticalSurfaceModel.h
0113 U4SurfaceType.h
0114 U4SurfacePerfect.h
0115 U4SurfaceArray.h
0116
0117 U4Mesh.h
0118 U4Version.h
0119 )
0120
0121 set(OTHER_HEADERS
0122 InstrumentedG4OpBoundaryProcess.hh
0123 )
0124
0125
0126 add_library(${name} ${SOURCES} ${HEADERS} )
0127
0128 target_link_libraries( ${name} PUBLIC
0129 SysRap
0130 CLHEP::CLHEP
0131 XercesC::XercesC
0132 GDXML
0133 Geant4::G4gdml
0134 Geant4::G4particles
0135 Geant4::G4track
0136 Geant4::G4digits_hits
0137 Geant4::G4processes
0138 Geant4::G4run
0139 )
0140
0141 target_include_directories( ${name} PUBLIC
0142 $<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}>
0143 $<INSTALL_INTERFACE:${CMAKE_INSTALL_INCLUDEDIR}/${PROJECT_NAME}/u4>
0144 )
0145
0146 target_compile_definitions( ${name} PUBLIC OPTICKS_U4 ) # THIS MUST BE PUBLIC FOR SLOG-ING TO WORK FULLY
0147 target_compile_definitions( ${name} PUBLIC GLM_ENABLE_EXPERIMENTAL )
0148
0149 target_compile_definitions( ${name} PRIVATE G4USE_STD11 )
0150 target_compile_definitions( ${name} PRIVATE STANDALONE )
0151
0152
0153 if(Custom4_FOUND)
0154 target_link_libraries( ${name} PUBLIC Custom4::Custom4 )
0155 target_compile_definitions( ${name} PRIVATE WITH_CUSTOM4 ) # MINTING A DEF ? MAYBE COMES WITH THE TARGET ANYHOW
0156 endif()
0157
0158 if(PMTSim_standalone_FOUND)
0159 target_link_libraries( ${name} PUBLIC Opticks::PMTSim_standalone )
0160 target_compile_definitions( ${name} PRIVATE WITH_PMTSIM PMTSIM_STANDALONE WITH_NP )
0161 ## THE DEFS CANNOT BE PUBLIC : AS CAUSE ISSUES FOR JUNOSW BUILD WITH OPTICKS
0162 endif()
0163
0164
0165 install(FILES ${HEADERS} DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/${PROJECT_NAME}/u4)
0166
0167 install(TARGETS ${name}
0168 EXPORT ${PROJECT_NAME}Targets
0169 LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}
0170 ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR}
0171 )