# 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} ${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}/passive ${CMAKE_SOURCE_DIR}/mvd/MvdMC ${CMAKE_SOURCE_DIR}/mvd/MvdData ${CMAKE_SOURCE_DIR}/mvd/MvdDigi ${CMAKE_SOURCE_DIR}/mvd/MvdReco ${CMAKE_SOURCE_DIR}/mvd/transport ${CMAKE_SOURCE_DIR}/mvd ) include_directories( ${INCLUDE_DIRECTORIES}) set(LINK_DIRECTORIES ${ROOT_LIBRARY_DIR} ) link_directories( ${LINK_DIRECTORIES}) ######### create libMvd ###################### set(MVD_SRCS MvdData/MvdCluster.cxx MvdData/MvdDetIdPair.cxx MvdData/MvdDigiPixel.cxx MvdData/MvdHit.cxx MvdData/MvdHitInfo.cxx MvdData/MvdPixelCluster.cxx MvdData/MvdPoint.cxx MvdData/MvdStripCluster.cxx MvdData/MvdTrackCand.cxx MvdDigi/MvdCalcFePixel.cxx MvdDigi/MvdCalcPixel.cxx MvdDigi/MvdCalcStrip.cxx MvdDigi/MvdDigiAna.cxx MvdDigi/MvdDigiPar.cxx MvdDigi/MvdHybridHitProducer.cxx MvdDigi/MvdStripHitProducer.cxx MvdMC/MvdContFact.cxx MvdMC/MvdDetector.cxx MvdMC/MvdGeo.cxx MvdMC/MvdGeoPar.cxx MvdMC/MvdGeoMappingPar.cxx MvdMC/StringVector.cxx MvdPid/MvdPidIdealTask.cxx MvdHitProducerIdeal.cxx MvdIdealTrackingTask.cxx MvdMCClusterTask.cxx MvdDetIdSelector.cxx ) # fill list of header files from list of source files # by exchanging the file extension CHANGE_FILE_EXTENSION(*.cxx *.h MVD_HEADERS "${MVD_SRCS}") SET(MVD_SRCS ${MVD_SRCS} ${DIGI_SRCS}) SET(MVD_HEADERS ${MVD_HEADERS} ${DIGI_HEADERS}) set(MVD_LINKDEF MvdLinkDef.h) set(MVD_DICTIONARY ${CMAKE_CURRENT_BINARY_DIR}/MvdDict.cxx) ROOT_GENERATE_DICTIONARY("${MVD_HEADERS}" "${MVD_LINKDEF}" "${MVD_DICTIONARY}" "${INCLUDE_DIRECTORIES}") SET(MVD_SRCS ${MVD_SRCS} ${MVD_DICTIONARY}) add_library(Mvd SHARED ${MVD_SRCS}) target_link_libraries(Mvd ${ROOT_LIBRARIES}) set_target_properties(Mvd PROPERTIES VERSION 0.0.1 SOVERSION 0 ) ################ install ################### install(TARGETS Mvd DESTINATION ${CMAKE_BINARY_DIR}/lib)