CMakeLists.txt 2.0 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556
  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}/mpddst
  16. ${MPDROOTDIR}/mpdbase
  17. ${MPDROOTDIR}/mpdpid
  18. )
  19. #---Add Needed libraries
  20. #find_library(BASE NAMES Base PATHS ${FAIRROOT_LIBRARY_DIR})
  21. find_library(MCSTACK NAMES MCStack PATHS $ENV{FAIRLIBDIR})
  22. find_library(PASSIVE NAMES Passive PATHS $ENV{FAIRLIBDIR})
  23. find_library(MPDFIELD NAMES MpdField PATHS $ENV{FAIRLIBDIR})
  24. find_library(MPDBASE NAMES MpdBase PATHS $ENV{FAIRLIBDIR})
  25. find_library(MPDDST NAMES MpdDst PATHS $ENV{FAIRLIBDIR})
  26. find_library(MPDGENERALGENERATOR NAMES MpdGeneralGenerator PATHS $ENV{FAIRLIBDIR})
  27. find_library(KALMAN NAMES Kalman PATHS $ENV{FAIRLIBDIR})
  28. find_library(CLUSTER NAMES Cluster PATHS $ENV{FAIRLIBDIR})
  29. find_library(TPC NAMES tpc PATHS $ENV{FAIRLIBDIR})
  30. find_library(TOF NAMES Tof PATHS $ENV{FAIRLIBDIR})
  31. find_library(ETOF NAMES Etof PATHS $ENV{FAIRLIBDIR})
  32. find_library(STRAWENDCAP NAMES Strawendcap PATHS $ENV{FAIRLIBDIR})
  33. find_library(ZDC NAMES Zdc PATHS $ENV{FAIRLIBDIR})
  34. find_library(FFD NAMES Ffd PATHS $ENV{FAIRLIBDIR})
  35. find_library(CPC NAMES Cpc PATHS $ENV{FAIRLIBDIR})
  36. find_library(STRAWECT NAMES StrawECT PATHS $ENV{FAIRLIBDIR})
  37. find_library(LHETrack NAMES LHETrack PATHS $ENV{FAIRLIBDIR})
  38. find_library(STS NAMES Sts PATHS $ENV{FAIRLIBDIR})
  39. find_library(MPDPID NAMES MpdPid PATHS $ENV{FAIRLIBDIR})
  40. include_directories(${INCLUDE_DIRECTORIES})
  41. SET_SOURCE_FILES_PROPERTIES( get_dca.c PROPERTIES LANGUAGE CXX )
  42. set(INCLUDE_LIBRARIES
  43. ${ROOT_LIBRARIES}
  44. ${MCSTACK} ${PASSIVE} ${KALMAN} ${CLUSTER} ${TPC} ${STS} ${ZDC} ${FFD}
  45. ${STRAWECT} ${STRAWENDCAP} ${LHETRACK} ${TOF}
  46. ${MPDFIELD} ${MPDBASE} ${MPDDST} ${MPDGENERALGENERATOR} ${MPDPID}
  47. )
  48. # Compile executable
  49. add_executable(get-dca get_dca.c)
  50. target_link_libraries(get-dca ${INCLUDE_LIBRARIES})