# Create a library called "" which includes the source files given in # the array . # The extension is already found. Any number of sources could be listed here. set(INCLUDE_DIRECTORIES ${ROOT_INCLUDE_DIR} ${GEANT3_INCLUDE_DIR} ${CLHEP_INCLUDE_DIR} ${CMAKE_SOURCE_DIR}/geobase ${CMAKE_SOURCE_DIR}/parbase ${CMAKE_SOURCE_DIR}/base ${CMAKE_SOURCE_DIR}/field ${CMAKE_SOURCE_DIR}/mcstack ${CMAKE_SOURCE_DIR}/stt2 ) include_directories( ${INCLUDE_DIRECTORIES}) set(LINK_DIRECTORIES ${ROOT_LIBRARY_DIR} ) link_directories( ${LINK_DIRECTORIES}) set(STT2_SRCS CbmSttMatchTracks.cxx CbmGeoStt.cxx CbmSttMinuitTrackFitter.cxx CbmSttPoint.cxx CbmSttTrack.cxx CbmStt.cxx CbmGeoSttPar.cxx CbmSttContFact.cxx CbmSttDigiPar.cxx CbmSttParRootFileIo.cxx CbmSttParAsciiFileIo.cxx CbmSttTrackFinder.cxx CbmSttTrackFinderHough.cxx CbmSttFindTracks.cxx CbmSttTrackFinderIdeal.cxx CbmSttFindTracksQa.cxx CbmSttTrackFitter.cxx CbmSttFitTracks.cxx CbmSttFitTracksQa.cxx CbmSttTrackMatch.cxx CbmSttHit.cxx CbmSttHitInfo.cxx CbmSttHitProducerIdeal.cxx CbmSttHoughAccumulatorNew.cxx CbmSttHoughCellNew.cxx CbmSttVertex.cxx CbmSttFindVertices.cxx CbmSttVertexFinder.cxx CbmSttVertexFinderIdeal.cxx CbmSttVertexFitter.cxx CbmSttMinuitVertexFitter.cxx CbmSttFitVertices.cxx CbmSttGeomCircle.cxx CbmSttGeomLine.cxx CbmSttGeomHelix.cxx CbmSttGeomPoint.cxx CbmSttHoughHitNew.cxx ) # fill list of header files from list of source files # by exchanging the file extension CHANGE_FILE_EXTENSION(*.cxx *.h STT2_HEADERS "${STT2_SRCS}") set(STT2_LINKDEF SttLinkDef.h) set(STT2_DICTIONARY ${CMAKE_CURRENT_BINARY_DIR}/CbmStt2Dict.cxx) ROOT_GENERATE_DICTIONARY("${STT2_HEADERS}" "${STT2_LINKDEF}" "${STT2_DICTIONARY}" "${INCLUDE_DIRECTORIES}") SET(STT2_SRCS ${STT2_SRCS} ${STT2_DICTIONARY}) add_library(Stt2 SHARED ${STT2_SRCS}) target_link_libraries(Stt2 ${ROOT_LIBRARIES}) set_target_properties(Stt2 PROPERTIES VERSION 0.0.1 SOVERSION 0 ) ################ install ################### install(TARGETS Stt2 DESTINATION ${CMAKE_BINARY_DIR}/lib)