Back to home page

EIC code displayed by LXR

 
 

    


Warning, /geant4/examples/basic/B5/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(B5)
0005 
0006 #----------------------------------------------------------------------------
0007 # Find Geant4 package, activating all available UI and Vis drivers by default
0008 # See the documentation for a guide on how to enable/disable specific components
0009 #
0010 find_package(Geant4 REQUIRED ui_all vis_all)
0011 
0012 #----------------------------------------------------------------------------
0013 # Locate sources and headers for this project
0014 # NB: headers are included so they will show up in IDEs
0015 #
0016 file(GLOB sources ${PROJECT_SOURCE_DIR}/src/*.cc)
0017 file(GLOB headers ${PROJECT_SOURCE_DIR}/include/*.hh)
0018 
0019 #----------------------------------------------------------------------------
0020 # Add the executable, use our local headers, and link it to the Geant4 libraries
0021 #
0022 add_executable(exampleB5 exampleB5.cc ${sources} ${headers})
0023 target_include_directories(exampleB5 PRIVATE include)
0024 target_link_libraries(exampleB5 PRIVATE ${Geant4_LIBRARIES})
0025 
0026 #----------------------------------------------------------------------------
0027 # Copy all scripts to the build directory, i.e. the directory in which we
0028 # build B5. This is so that we can run the executable directly because it
0029 # relies on these scripts being in the current working directory.
0030 #
0031 set(B5_SCRIPTS
0032   exampleB5.in
0033   exampleB5.out
0034   icons.mac
0035   gui.mac
0036   run.png
0037   init_vis.mac
0038   run1.mac
0039   run2.mac
0040   vis.mac
0041   plotter.mac
0042   tsg_offscreen.mac
0043   )
0044 
0045 foreach(_script ${B5_SCRIPTS})
0046   configure_file(
0047     ${PROJECT_SOURCE_DIR}/${_script}
0048     ${PROJECT_BINARY_DIR}/${_script}
0049     COPYONLY
0050     )
0051 endforeach()