CMakeLists.txt 2.2 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162
  1. set(INCLUDE_DIRECTORIES
  2. ${CMAKE_SOURCE_DIR}
  3. ${CMAKE_CURRENT_SOURCE_DIR}
  4. ${ROOT_INCLUDE_DIRS}
  5. ${FAIRROOT_INCLUDE_DIR}
  6. ${MPDROOTDIR}/tpc
  7. ${MPDROOTDIR}/kalman
  8. ${MPDROOTDIR}/lhetrack
  9. ${MPDROOTDIR}/mcstack
  10. ${MPDROOTDIR}/strawendcap
  11. ${MPDROOTDIR}/etof
  12. ${MPDROOTDIR}/tof
  13. ${MPDROOTDIR}/sft
  14. ${MPDROOTDIR}/sts
  15. ${MPDROOTDIR}/zdc
  16. ${MPDROOTDIR}/mpddst
  17. ${MPDROOTDIR}/mpdbase
  18. ${MPDROOTDIR}/mpdpid
  19. )
  20. #---Add Needed libraries
  21. find_library(BASE NAMES Base PATHS ${FAIRROOT_LIBRARY_DIR})
  22. find_library(MCSTACK NAMES MCStack PATHS $ENV{FAIRLIBDIR})
  23. find_library(PASSIVE NAMES Passive PATHS $ENV{FAIRLIBDIR})
  24. find_library(MPDFIELD NAMES MpdField PATHS $ENV{FAIRLIBDIR})
  25. find_library(MPDBASE NAMES MpdBase PATHS $ENV{FAIRLIBDIR})
  26. find_library(MPDDST NAMES MpdDst PATHS $ENV{FAIRLIBDIR})
  27. find_library(MPDGENERALGENERATOR NAMES MpdGeneralGenerator PATHS $ENV{FAIRLIBDIR})
  28. find_library(KALMAN NAMES Kalman PATHS $ENV{FAIRLIBDIR})
  29. find_library(CLUSTER NAMES Cluster PATHS $ENV{FAIRLIBDIR})
  30. find_library(TPC NAMES tpc PATHS $ENV{FAIRLIBDIR})
  31. find_library(TOF NAMES Tof PATHS $ENV{FAIRLIBDIR})
  32. find_library(ETOF NAMES Etof PATHS $ENV{FAIRLIBDIR})
  33. find_library(STRAWENDCAP NAMES Strawendcap PATHS $ENV{FAIRLIBDIR})
  34. find_library(ZDC NAMES Zdc PATHS $ENV{FAIRLIBDIR})
  35. find_library(FFD NAMES Ffd PATHS $ENV{FAIRLIBDIR})
  36. find_library(CPC NAMES Cpc PATHS $ENV{FAIRLIBDIR})
  37. find_library(STRAWECT NAMES StrawECT PATHS $ENV{FAIRLIBDIR})
  38. find_library(LHETrack NAMES LHETrack PATHS $ENV{FAIRLIBDIR})
  39. find_library(STS NAMES Sts PATHS $ENV{FAIRLIBDIR})
  40. find_library(MPDPID NAMES MpdPid PATHS $ENV{FAIRLIBDIR})
  41. include_directories(${INCLUDE_DIRECTORIES})
  42. set(INCLUDE_LIBRARIES
  43. ${ROOT_LIBRARIES} ${BASE}
  44. ${MCSTACK} ${PASSIVE} ${KALMAN} ${CLUSTER} ${TPC} ${STS} ${ZDC} ${FFD}
  45. ${STRAWECT} ${STRAWENDCAP} ${LHETRACK} ${TOF}
  46. ${MPDFIELD} ${MPDBASE} ${MPDDST} ${MPDGENERALGENERATOR} ${MPDPID}
  47. )
  48. SET_SOURCE_FILES_PROPERTIES( reducedTreeCreator.C PROPERTIES LANGUAGE CXX )
  49. #---Generate dictionary
  50. ROOT_GENERATE_DICTIONARY(G__reducedTreeCreator
  51. reducedTreeCreator.h
  52. LINKDEF reducedTreeCreator.LinkDef.h)
  53. # Compile executable
  54. add_executable(reducedTreeCreator reducedTreeCreator.C G__reducedTreeCreator.cxx)
  55. target_link_libraries(reducedTreeCreator ${INCLUDE_LIBRARIES})