set(INCLUDE_DIRECTORIES ${CMAKE_SOURCE_DIR} ${CMAKE_CURRENT_SOURCE_DIR} ${ROOT_INCLUDE_DIRS} ${FAIRROOT_INCLUDE_DIR} ${MPDROOTDIR}/tpc ${MPDROOTDIR}/kalman ${MPDROOTDIR}/lhetrack ${MPDROOTDIR}/mcstack ${MPDROOTDIR}/strawendcap ${MPDROOTDIR}/etof ${MPDROOTDIR}/tof ${MPDROOTDIR}/sft ${MPDROOTDIR}/sts ${MPDROOTDIR}/zdc ${MPDROOTDIR}/mpddst ${MPDROOTDIR}/mpdbase ${MPDROOTDIR}/mpdpid ) #---Add Needed libraries find_library(BASE NAMES Base PATHS ${FAIRROOT_LIBRARY_DIR}) find_library(MCSTACK NAMES MCStack PATHS $ENV{FAIRLIBDIR}) find_library(PASSIVE NAMES Passive PATHS $ENV{FAIRLIBDIR}) find_library(MPDFIELD NAMES MpdField PATHS $ENV{FAIRLIBDIR}) find_library(MPDBASE NAMES MpdBase PATHS $ENV{FAIRLIBDIR}) find_library(MPDDST NAMES MpdDst PATHS $ENV{FAIRLIBDIR}) find_library(MPDGENERALGENERATOR NAMES MpdGeneralGenerator PATHS $ENV{FAIRLIBDIR}) find_library(KALMAN NAMES Kalman PATHS $ENV{FAIRLIBDIR}) find_library(CLUSTER NAMES Cluster PATHS $ENV{FAIRLIBDIR}) find_library(TPC NAMES tpc PATHS $ENV{FAIRLIBDIR}) find_library(TOF NAMES Tof PATHS $ENV{FAIRLIBDIR}) find_library(ETOF NAMES Etof PATHS $ENV{FAIRLIBDIR}) find_library(STRAWENDCAP NAMES Strawendcap PATHS $ENV{FAIRLIBDIR}) find_library(ZDC NAMES Zdc PATHS $ENV{FAIRLIBDIR}) find_library(FFD NAMES Ffd PATHS $ENV{FAIRLIBDIR}) find_library(CPC NAMES Cpc PATHS $ENV{FAIRLIBDIR}) find_library(STRAWECT NAMES StrawECT PATHS $ENV{FAIRLIBDIR}) find_library(LHETrack NAMES LHETrack PATHS $ENV{FAIRLIBDIR}) find_library(STS NAMES Sts PATHS $ENV{FAIRLIBDIR}) find_library(MPDPID NAMES MpdPid PATHS $ENV{FAIRLIBDIR}) include_directories(${INCLUDE_DIRECTORIES}) set(INCLUDE_LIBRARIES ${ROOT_LIBRARIES} ${BASE} ${MCSTACK} ${PASSIVE} ${KALMAN} ${CLUSTER} ${TPC} ${STS} ${ZDC} ${FFD} ${STRAWECT} ${STRAWENDCAP} ${LHETRACK} ${TOF} ${MPDFIELD} ${MPDBASE} ${MPDDST} ${MPDGENERALGENERATOR} ${MPDPID} ) SET_SOURCE_FILES_PROPERTIES( reducedTreeCreator.C PROPERTIES LANGUAGE CXX ) #---Generate dictionary ROOT_GENERATE_DICTIONARY(G__reducedTreeCreator reducedTreeCreator.h LINKDEF reducedTreeCreator.LinkDef.h) # Compile executable add_executable(reducedTreeCreator reducedTreeCreator.C G__reducedTreeCreator.cxx) target_link_libraries(reducedTreeCreator ${INCLUDE_LIBRARIES})