Warning, /geant4/examples/extended/runAndEvent/RE07/CMakeLists.txt is written in an unsupported language. File is not indexed.
0001 #----------------------------------------------------------------------------
0002 # Setup the project
0003 cmake_minimum_required(VERSION 3.16...3.27)
0004 project(RE07)
0005
0006 #----------------------------------------------------------------------------
0007 # Find Geant4 package, activating all available UI and Vis drivers by default
0008 # You can set WITH_GEANT4_UIVIS to OFF via the command line or ccmake/cmake-gui
0009 # to build a batch mode only executable
0010 #
0011 option(WITH_GEANT4_UIVIS "Build example with Geant4 UI and Vis drivers" ON)
0012 if(WITH_GEANT4_UIVIS)
0013 find_package(Geant4 REQUIRED ui_all vis_all)
0014 else()
0015 find_package(Geant4 REQUIRED)
0016 endif()
0017
0018 #----------------------------------------------------------------------------
0019 # Setup Geant4 include directories and compile definitions
0020 #
0021 include(${Geant4_USE_FILE})
0022 include_directories(${PROJECT_SOURCE_DIR}/include
0023 ${Geant4_INCLUDE_DIR})
0024
0025 #----------------------------------------------------------------------------
0026 # Define sources for this project
0027 #
0028 set(sources
0029 exampleRE07.cc
0030 src/ActionInitialization.cc
0031 src/DetectorConstruction.cc
0032 src/DetectorMessenger.cc
0033 src/EmStandardPhysicsTrackingManager.cc
0034 src/EventAction.cc
0035 src/PhysicsList.cc
0036 src/PhysicsListEmSpecialized.cc
0037 src/PhysicsListEmStandardTracking.cc
0038 src/PhysicsListMessenger.cc
0039 src/PrimaryGeneratorAction.cc
0040 src/RunAction.cc
0041 src/Run.cc
0042 src/SpecializedTrackingManager.cc
0043 src/SteppingAction.cc
0044 src/TrackingAction.cc)
0045
0046 #----------------------------------------------------------------------------
0047 # Add the executable, and link it to the Geant4 libraries
0048 #
0049 add_executable(exampleRE07 ${sources})
0050 target_link_libraries(exampleRE07 ${Geant4_LIBRARIES})
0051
0052 #----------------------------------------------------------------------------
0053 # Install the executable to 'bin' directory under CMAKE_INSTALL_PREFIX
0054 #
0055 install(TARGETS exampleRE07 DESTINATION bin)