# 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} ${CMAKE_SOURCE_DIR}/geobase ${CMAKE_SOURCE_DIR}/base ${CMAKE_SOURCE_DIR}/parbase ${CMAKE_SOURCE_DIR}/field ${CMAKE_SOURCE_DIR}/mcstack ${CMAKE_SOURCE_DIR}/dch ) include_directories( ${INCLUDE_DIRECTORIES}) set(LINK_DIRECTORIES ${ROOT_LIBRARY_DIR} ) link_directories( ${LINK_DIRECTORIES}) set(DCH_SRCS PndDchGeoPar.cxx PndDchContFact.cxx PndDchGeo.cxx PndDchPoint.cxx PndDchDetector.cxx PndDchStructure.cxx PndDchDigi.cxx PndDchDigiProducer.cxx PndDchMapper.cxx PndDchDrifter.cxx PndDchSimpleFitter.cxx PndDchIdealHitProducer.cxx PndDchHit.cxx ) # fill list of header files from list of source files # by exchanging the file extension CHANGE_FILE_EXTENSION(*.cxx *.h DCH_HEADERS "${DCH_SRCS}") set(DCH_LINKDEF DchLinkDef.h) set(DCH_DICTIONARY ${CMAKE_CURRENT_BINARY_DIR}/DchDict.cxx) ROOT_GENERATE_DICTIONARY("${DCH_HEADERS}" "${DCH_LINKDEF}" "${DCH_DICTIONARY}" "${INCLUDE_DIRECTORIES}") SET(DCH_SRCS ${DCH_SRCS} ${DCH_DICTIONARY}) add_library(Dch SHARED ${DCH_SRCS}) target_link_libraries(Dch ${ROOT_LIBRARIES}) set_target_properties(Dch PROPERTIES VERSION 0.0.1 SOVERSION 0 ) ################ install ################### install(TARGETS Dch DESTINATION ${CMAKE_BINARY_DIR}/lib)