Back to home page

EIC code displayed by LXR

 
 

    


Warning, /geant4/examples/advanced/iort_therapy/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(iort_therapy)
0005 
0006 option(WITH_GEANT4_UIVIS "Build example with Geant4 UI and Vis drivers" ON)
0007 if(WITH_GEANT4_UIVIS)
0008   find_package(Geant4 REQUIRED ui_all vis_all)
0009 else()
0010   find_package(Geant4 REQUIRED)
0011 endif()
0012 
0013 #----------------------------------------------------------------------------
0014 # Setup Geant4 include directories and compile definitions
0015 #
0016 include(${Geant4_USE_FILE})
0017 include_directories(${PROJECT_SOURCE_DIR}/include
0018                     ${Geant4_INCLUDE_DIR})
0019 #endif()
0020 
0021 #----------------------------------------------------------------------------
0022 # Locate sources and headers for this project
0023 #
0024 file(GLOB sources ${PROJECT_SOURCE_DIR}/src/*.cc)
0025 file(GLOB headers ${PROJECT_SOURCE_DIR}/include/*.hh)
0026 
0027 #----------------------------------------------------------------------------
0028 # Add the executable, and link it to the Geant4 libraries
0029 #
0030 add_executable(iort_therapy iort_therapy.cc ${sources} ${headers})
0031 target_link_libraries(iort_therapy ${Geant4_LIBRARIES})
0032 
0033 #----------------------------------------------------------------------------
0034 # Copy all scripts to the build directory, i.e. the directory in which we
0035 # build iort_therapy. This is so that we can run the executable directly because it
0036 # relies on these scripts being in the current working directory.
0037 #
0038 set(iort_therapy_SCRIPTS
0039     batch.mac defaultMacro.mac)
0040 
0041 foreach(_script ${iort_therapy_SCRIPTS})
0042   configure_file(
0043     ${PROJECT_SOURCE_DIR}/${_script}
0044     ${PROJECT_BINARY_DIR}/${_script}
0045     COPYONLY
0046     )
0047 endforeach()
0048 
0049 #----------------------------------------------------------------------------
0050 # Install the executable to 'bin' directory under CMAKE_INSTALL_PREFIX
0051 #
0052 install(TARGETS iort_therapy DESTINATION bin)
0053