Back to home page

EIC code displayed by LXR

 
 

    


Warning, /geant4/examples/extended/exoticphysics/channeling/CMakeLists.txt is written in an unsupported language. File is not indexed.

0001 #----------------------------------------------------------------------------
0002 # Setup the project
0003 #
0004 cmake_minimum_required(VERSION 3.16...3.27)
0005 project(channeling)
0006 
0007 #----------------------------------------------------------------------------
0008 # Find Geant4 package, activating all available UI and Vis drivers by default
0009 # You can set WITH_GEANT4_UIVIS to OFF via the command line or ccmake/cmake-gui
0010 # to build a batch mode only executable
0011 #
0012 
0013 option(WITH_GEANT4_UIVIS "Build example with Geant4 UI and Vis drivers" ON)
0014 if(WITH_GEANT4_UIVIS)
0015   find_package(Geant4 REQUIRED ui_all vis_all)
0016 else()
0017   find_package(Geant4 REQUIRED)
0018 endif()
0019 
0020 #----------------------------------------------------------------------------
0021 # Setup Geant4 include directories and compile definitions
0022 # Setup include directory for this project
0023 #
0024 include(${Geant4_USE_FILE})
0025 include_directories(${PROJECT_SOURCE_DIR}/include)
0026 
0027 #----------------------------------------------------------------------------
0028 # Locate sources and headers for this project
0029 # NB: headers are included so they will show up in IDEs
0030 #
0031 file(GLOB sources ${PROJECT_SOURCE_DIR}/src/*.cc)
0032 file(GLOB headers ${PROJECT_SOURCE_DIR}/include/*.hh)
0033 
0034 #----------------------------------------------------------------------------
0035 # Install data 
0036 #
0037 file(GLOB _data RELATIVE ${PROJECT_SOURCE_DIR} ${PROJECT_SOURCE_DIR}/data/*.txt)
0038 foreach(_dat ${_data})
0039      configure_file(
0040         ${PROJECT_SOURCE_DIR}/${_dat}
0041         ${PROJECT_BINARY_DIR}/${_dat}
0042         COPYONLY
0043         )
0044 endforeach()
0045 file(GLOB _data RELATIVE ${PROJECT_SOURCE_DIR}/mac ${PROJECT_SOURCE_DIR}/mac/*.mac)
0046 foreach(_dat ${_data})
0047      configure_file(
0048         ${PROJECT_SOURCE_DIR}/mac/${_dat}
0049         ${PROJECT_BINARY_DIR}/${_dat}
0050         COPYONLY
0051         )
0052 endforeach()
0053 file(GLOB _data RELATIVE ${PROJECT_SOURCE_DIR}/analysis ${PROJECT_SOURCE_DIR}/analysis/*.sh ${PROJECT_SOURCE_DIR}/analysis/*.C)
0054 foreach(_dat ${_data})
0055      configure_file(
0056         ${PROJECT_SOURCE_DIR}/analysis/${_dat}
0057         ${PROJECT_BINARY_DIR}/${_dat}
0058         COPYONLY
0059         )
0060 endforeach()
0061 
0062 
0063 #----------------------------------------------------------------------------
0064 # Add the executable, and link it to the Geant4 libraries
0065 #
0066 add_executable(channeling channeling.cc ${sources} ${headers})
0067 target_link_libraries(channeling ${Geant4_LIBRARIES})
0068 
0069 
0070 #----------------------------------------------------------------------------
0071 # For internal Geant4 use - but has no effect if you build this
0072 # example standalone
0073 #
0074 add_custom_target(channeling_custom DEPENDS channeling)
0075 
0076 #----------------------------------------------------------------------------
0077 # Install the executable to 'bin' directory under CMAKE_INSTALL_PREFIX
0078 #
0079 install(TARGETS channeling DESTINATION bin)
0080 
0081