Warning, /geant4/examples/extended/medical/dna/chem4/plot/CMakeLists.txt is written in an unsupported language. File is not indexed.
0001
0002 #----------------------------------------------------------------------------
0003 # Setup the project
0004 #
0005 cmake_minimum_required(VERSION 3.16...3.27)
0006 project(plotG)
0007
0008 #----------------------------------------------------------------------------
0009 # ROOT
0010 #
0011 list(APPEND CMAKE_PREFIX_PATH $ENV{ROOTSYS})
0012 find_package(ROOT REQUIRED COMPONENTS Gui)
0013 add_definitions(-DUSE_ROOT)
0014
0015 # Define useful ROOT functions and macros (e.g. ROOT_GENERATE_DICTIONARY)
0016 include(${ROOT_USE_FILE})
0017
0018 include_directories(${PROJECT_SOURCE_DIR} ${ROOT_INCLUDE_DIRS})
0019 add_definitions(${ROOT_CXX_FLAGS})
0020
0021 #----------------------------------------------------------------------------
0022 # Setup include directory for this project
0023 #
0024 include_directories(${PROJECT_SOURCE_DIR}/include)
0025
0026 #----------------------------------------------------------------------------
0027 # Locate sources and headers for this project
0028 # NB: headers are included so they will show up in IDEs
0029 #
0030
0031 EXECUTE_PROCESS(COMMAND ${ROOT_rootcint_CMD} -f ${PROJECT_BINARY_DIR}/CanvasInTab_Dict.cc
0032 ${PROJECT_SOURCE_DIR}/include/CanvasInTab.hh
0033 ${PROJECT_SOURCE_DIR}/include/CanvasInTab_LinkDef.hh)
0034
0035 file(GLOB headers ${PROJECT_SOURCE_DIR}/include/*.hh)
0036 file(GLOB sources ${PROJECT_SOURCE_DIR}/src/*.cc
0037 ${PROJECT_BINARY_DIR}/CanvasInTab_Dict.cc)
0038
0039 #----------------------------------------------------------------------------
0040 # Add the executable, and link it to the Geant4 libraries
0041 #
0042
0043 add_executable(plotG plotG.cc ${sources} ${headers})
0044 target_link_libraries(plotG ${ROOT_LIBRARIES})
0045
0046 #----------------------------------------------------------------------------
0047 # Install the executable to 'bin' directory under CMAKE_INSTALL_PREFIX
0048 #
0049
0050 install(TARGETS plotG DESTINATION bin)