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}/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_SOURCE_FILES_PROPERTIES( get_dca.c PROPERTIES LANGUAGE CXX ) set(INCLUDE_LIBRARIES ${ROOT_LIBRARIES} ${MCSTACK} ${PASSIVE} ${KALMAN} ${CLUSTER} ${TPC} ${STS} ${ZDC} ${FFD} ${STRAWECT} ${STRAWENDCAP} ${LHETRACK} ${TOF} ${MPDFIELD} ${MPDBASE} ${MPDDST} ${MPDGENERALGENERATOR} ${MPDPID} ) # Compile executable add_executable(get-dca get_dca.c) target_link_libraries(get-dca ${INCLUDE_LIBRARIES})