Warning, /geant4/examples/extended/eventgenerator/pythia/py8decayer/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
0006 project(py8decayer)
0007
0008 #----------------------------------------------------------------------------
0009 # Find Geant4 package, activating all available UI and Vis drivers by default
0010 # You can set WITH_GEANT4_UIVIS to OFF via the command line or ccmake/cmake-gui
0011 # to build a batch mode only executable
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 #
0023 include(${Geant4_USE_FILE})
0024
0025 #----------------------------------------------------------------------------
0026 # Find Pythia8 (required package)
0027 #
0028 find_package(Pythia8 REQUIRED)
0029
0030 #----------------------------------------------------------------------------
0031 # Locate sources and headers for this project
0032 #
0033 include_directories(${PROJECT_SOURCE_DIR}/include)
0034 file(GLOB sources ${PROJECT_SOURCE_DIR}/src/*.cc ${PROJECT_SOURCE_DIR}/src/*.c)
0035 file(GLOB headers ${PROJECT_SOURCE_DIR}/include/*.hh)
0036
0037 #----------------------------------------------------------------------------
0038 # Add the executable, and link it to the Geant4 libraries
0039 #
0040 add_executable(pythia8_decayer pythia8_decayer.cc ${sources} ${headers})
0041 target_link_libraries(pythia8_decayer ${Geant4_LIBRARIES} Pythia8::Pythia8 )
0042
0043 #----------------------------------------------------------------------------
0044 # Copy all scripts to the build directory, i.e. the directory in which we
0045 # build decayer6. This is so that we can run the executable directly because it
0046 # relies on these scripts being in the current working directory.
0047 #
0048 # ---> NO NEED SO FAR !!!
0049 #
0050 #set(py8decayer_SCRIPTS
0051 # init_vis.mac pythia8_decayer.in pythia8_decayer.out vis.mac
0052 # )
0053
0054 #foreach(_script ${py8decayer_SCRIPTS})
0055 # configure_file(
0056 # ${PROJECT_SOURCE_DIR}/${_script}
0057 # ${PROJECT_BINARY_DIR}/${_script}
0058 # COPYONLY
0059 # )
0060 #endforeach()
0061
0062 #----------------------------------------------------------------------------
0063 # Install the executable to 'bin' directory under CMAKE_INSTALL_PREFIX
0064 #
0065 install(TARGETS pythia8_decayer DESTINATION bin)
0066