123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475 |
- # CMakeLists.txt for StFemtoEvent package. It creates a library with dictionary
- cmake_minimum_required(VERSION 3.0 FATAL_ERROR)
- project(StFemtoDst)
- # You need to tell CMake where to find the ROOT installation. This can be done in a number of ways:
- # - ROOT built with classic configure/make use the provided $ROOTSYS/etc/cmake/FindROOT.cmake
- # - ROOT built with CMake. Add in CMAKE_PREFIX_PATH the installation prefix for ROOT
- if(ROOT_CMAKE)
- list(APPEND CMAKE_PREFIX_PATH $ENV{ROOTSYS})
- else(ROOT_CMAKE)
- set(ROOT_PREINSTALLED "/usr/lib64/Geant4-10.3.0/Modules")
- list(APPEND CMAKE_MODULE_PATH ${ROOT_PREINSTALLED})
- endif(ROOT_CMAKE)
- #---Locate the ROOT package and defines a number of variables (e.g. ROOT_INCLUDE_DIRS)
- find_package(ROOT REQUIRED COMPONENTS MathCore RIO Hist Tree Net)
- #---Define useful ROOT functions and macros (e.g. ROOT_GENERATE_DICTIONARY)
- if(ROOT_CMAKE)
- include(${ROOT_USE_FILE})
- endif(ROOT_CMAKE)
- #---Define _VANILLA_ROOT_ variable needed for the project
- add_definitions(-D_VANILLA_ROOT_)
- set(INCLUDE_DIRECTORIES
- ${CMAKE_SOURCE_DIR}
- ${ROOT_INCLUDE_DIRS}
- )
- include_directories(${INCLUDE_DIRECTORIES})
- add_definitions(${ROOT_CXX_FLAGS})
- set(CMAKE_BUILD_TYPE Debug)
- set(CMAKE_C_FLAGS "-O2")
- set(HEADER_FILES
- #PhysicalConstants.h
- StFemtoArrays.h
- StFemtoDst.h
- StFemtoDstReader.h
- StFemtoEvent.h
- StFemtoHelix.h
- #StFemtoMessMgr.h
- StFemtoPhysicalHelix.h
- StFemtoTrack.h
- StFemtoV0.h
- StFemtoXi.h
- #SystemOfUnits.h
- )
- set(CXX_FILES
- StFemtoArrays.cxx
- StFemtoDst.cxx
- StFemtoDstReader.cxx
- StFemtoEvent.cxx
- StFemtoHelix.cxx
- StFemtoPhysicalHelix.cxx
- StFemtoTrack.cxx
- StFemtoV0.cxx
- StFemtoXi.cxx
- )
- #---Generate dictionary for the project
- ROOT_GENERATE_DICTIONARY(G__StFemtoDst
- ${HEADER_FILES}
- LINKDEF StFemtoDstLinkDef.h)
- #---Create a shared library with generated dictionary
- add_library(StFemtoDst SHARED
- ${CXX_FILES}
- G__StFemtoDst.cxx)
- target_link_libraries(StFemtoDst ${ROOT_LIBRARIES})
|