# The name of our project is "CBMROOT". CMakeLists files in this project can # refer to the root source directory of the project as ${CBMROOT_SOURCE_DIR} # and to the root binary directory of the project as ${CBMROOT_BINARY_DIR}. project(CBMROOT) # where to look first for cmake modules, before ${CMAKE_ROOT}/Modules/ is checked set(CMAKE_MODULE_PATH "${CMAKE_SOURCE_DIR}/cmake/modules") include(WriteConfigFile) include(Dart) SET(LD_LIBRARY_PATH "") SET(ROOTSIM ROOTSIM-NOTFOUND) FIND_PATH(ROOTSIM NAMES transport PATHS $ENV{ROOTSIM} /misc/cbmsoft/Debian3.1/ NO_DEFAULT_PATH ) IF (${ROOTSIM} MATCHES "ROOTSIM-NOTFOUND") MESSAGE( FATAL_ERROR "Could not find the root of the simulation software") ELSE (${ROOTSIM} MATCHES "ROOTSIM-NOTFOUND") MESSAGE( STATUS "Found root of the simulation software at ${ROOTSIM}") SET( ENV{ROOTSIM} ${ROOTSIM}) ENDIF (${ROOTSIM} MATCHES "ROOTSIM-NOTFOUND") # searches for needed packages find_package(ROOT REQUIRED) find_package(GEANT3 REQUIRED) find_package(PLUTO REQUIRED) find_package(GEANT4) find_package(GEANT4VMC) find_package(GENERATORS REQUIRED) find_package(CLHEP) # Recurse into the given subdirectories. This does not actually # cause another cmake executable to run. The same process will walk through # the project's entire directory structure. add_subdirectory (geobase) add_subdirectory (parbase) add_subdirectory (base) add_subdirectory (mcstack) add_subdirectory (field) add_subdirectory (generators) add_subdirectory (passive) add_subdirectory (rich) add_subdirectory (sts) add_subdirectory (tof) add_subdirectory (trd) add_subdirectory (ecal) add_subdirectory (zdc) add_subdirectory (much) add_subdirectory (global) add_subdirectory (KF) add_subdirectory (L1) if(GEANT4_FOUND AND GEANT4VMC_FOUND AND CLHEP_FOUND) add_subdirectory (cbmg4) endif(GEANT4_FOUND AND GEANT4VMC_FOUND AND CLHEP_FOUND) WRITE_CONFIG_FILE(config.sh)