# Create a library called "tpcreco" which includes the source files given in # the array . # The extension is already found. Any number of sources could be listed here. IF(NOT DEFINED ENV{RAVEPATH}) MESSAGE(FATAL_ERROR "RAVEPATH is not set!") ENDIF(NOT DEFINED ENV{RAVEPATH}) SET(RAVEPATH $ENV{RAVEPATH}) # get compiler flags from rave INCLUDE(UsePkgConfig) SET(ENV{PKG_CONFIG_PATH} ${RAVEPATH}) PKGCONFIG(rave RAVE_INCLUDE_DIR RAVE_LINK_DIR RAVE_LINK_FLAGS CMAKE_CXX_FLAGS ) set(LINK_DIRECTORIES ${ROOT_LIBRARY_DIR} ${RAVE_LINK_DIR} ) link_directories( ${LINK_DIRECTORIES}) set(RECO_INCLUDE_DIRECTORIES ${INCLUDE_DIRECTORIES} ${RAVE_INCLUDE_DIR} ) SET(TPC_RECO_SOURCES TpcDataReaderTask.cxx TpcTrackInitTask.cxx TpcEvtDeconvTask.cxx TpcIdealTrackingTask.cxx TpcIdealTrackingTask2.cxx TpcdEdxTask.cxx TpcdEdx.cxx #TpcGenfitTestTask.cxx #TpcTestPlanarHit.cxx #TpcMVDCorrelatorTask.cxx #TpcGEMCorrelatorTask.cxx TpcRoughAlignmentTask.cxx TpcVertexingTask.cxx TpcSimpleVertexingTask.cxx TpcPrelimCluster.cxx TpcClusterFinderSimple.cxx TpcClusterFinderTask.cxx TpcClusterCOG.cxx TpcClusterCorrectionTask.cxx TpcClusterCorrector.cxx TpcReClusterizerTask.cxx TpcTrackCleaner.cxx #TpcClusterAlignmentTask.cxx CAClusterFinder/TORPadProcessor.cxx CAClusterFinder/TORPPState_Output.cxx CAClusterFinder/TpcClusterFitLikeli.cxx CAClusterFinder/TORPPState_Compare.cxx CAClusterFinder/TORPPState_Send.cxx CAClusterFinder/TpcClusterFitter.cxx CAClusterFinder/TORPPState_End.cxx CAClusterFinder/TORPPState_Wait.cxx CAClusterFinder/TORPPState_Initial.cxx CAClusterFinder/TpcClusterFinder.cxx CAClusterFinder/TpcSectorProcessor.cxx RiemannPR/TpcClustershapeCorrelator.cxx RiemannPR/TpcRiemannHit.cxx RiemannPR/TpcRiemannTrack.cxx RiemannPR/TpcDipTTCorrelator.cxx RiemannPR/TpcRiemannTrackFinder.cxx RiemannPR/TpcHelixHTCorrelator.cxx RiemannPR/TpcRiemannMCResidual.cxx RiemannPR/TpcRiemannTrackingTask.cxx RiemannPR/TpcProximityHTCorrelator.cxx RiemannPR/TpcRiemannTTCorrelator.cxx HoughPR/Hough2DNode.cxx HoughPR/Hough4DNode.cxx HoughPR/Hypersurface2D.cxx HoughPR/Hypersurface4D.cxx HoughPR/TpcSLPatternRecoTask.cxx TpcAbsPSAStrategy.cxx TpcSimplePSAStrategy.cxx TpcPSA_TOT1.cxx TpcPSA_INT1.cxx TpcPSATask.cxx TrackCopyTask.cxx TpcAlignmentTask.cxx Chi2CleanupTask.cxx AddTrackRepTask.cxx TpcClusterErrorRecalcTask.cxx ) if(NOT DEFINED ENV{SKIPSVERRE}) if(DEFINED ENV{BATINSTALLDIR}) MESSAGE("Found BAT environment: $ENV{BATINSTALLDIR}") SET(BAT_SRCS #TpcAlignment.cxx TpcAlignmentSimple.cxx BatAlignmentModel.cxx TpcStandaloneResCalc.cxx TpcAligner.cxx) SET(RECO_INCLUDE_DIRECTORIES "${RECO_INCLUDE_DIRECTORIES}" "$ENV{BATINSTALLDIR}/include") include_directories(${RECO_INCLUDE_DIRECTORIES}) SET(TPC_RECO_SOURCES ${TPC_RECO_SOURCES} ${BAT_SRCS}) endif(DEFINED ENV{BATINSTALLDIR}) endif(NOT DEFINED ENV{SKIPSVERRE}) CHANGE_FILE_EXTENSION(*.cxx *.h TPC_RECO_HEADERS "${TPC_RECO_SOURCES}") set(TPC_RECO_LINKDEF tpcRecoLinkDef.h) set(TPC_RECO_DICTIONARY ${CMAKE_CURRENT_BINARY_DIR}/tpcRecoDict.cxx) set(TPC_RECO_BAT_LINKDEF tpcRecoBATLinkDef.h) set(TPC_RECO_BAT_DICTIONARY ${CMAKE_CURRENT_BINARY_DIR}/tpcRecoBATDict.cxx) if(NOT DEFINED ENV{SKIPSVERRE}) if(DEFINED ENV{BATINSTALLDIR}) ROOT_GENERATE_DICTIONARY("${TPC_RECO_HEADERS}" "${TPC_RECO_BAT_LINKDEF}" "${TPC_RECO_BAT_DICTIONARY}" "${RECO_INCLUDE_DIRECTORIES}") SET(TPC_RECO_SOURCES ${TPC_RECO_SOURCES} ${TPC_RECO_BAT_DICTIONARY}) endif(DEFINED ENV{BATINSTALLDIR}) endif(NOT DEFINED ENV{SKIPSVERRE}) ROOT_GENERATE_DICTIONARY("${TPC_RECO_HEADERS}" "${TPC_RECO_LINKDEF}" "${TPC_RECO_DICTIONARY}" "${RECO_INCLUDE_DIRECTORIES}") SET(TPC_RECO_SOURCES ${TPC_RECO_SOURCES} ${TPC_RECO_DICTIONARY}) include_directories(${RAVE_INCLUDE_DIR}/rave) add_library(TpcReco SHARED ${TPC_RECO_SOURCES}) set_target_properties(TpcReco PROPERTIES ${FAIRROOT_LIBRARY_PROPERTIES}) target_link_libraries(TpcReco ${ROOT_LIBRARIES} -L${CMAKE_BINARY_DIR}/lib TpcFOPI TpcTools TpcPar gfrave ${RAVE_LINK_FLAGS} -I${RAVE_LINK_DIR} ) if(NOT DEFINED ENV{SKIPSVERRE}) if(DEFINED ENV{BATINSTALLDIR}) target_link_libraries(TpcReco -L$ENV{BATINSTALLDIR}/lib -lBAT) endif(DEFINED ENV{BATINSTALLDIR}) endif(NOT DEFINED ENV{SKIPSVERRE}) install(TARGETS TpcReco DESTINATION ${CMAKE_BINARY_DIR}/lib)