# Create a library called "libPndTorinoDetector" 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} #put here all directories where header files are located ${PANDAROOT_SOURCE_DIR}/fairtools ${PANDAROOT_SOURCE_DIR}/base #${PANDAROOT_SOURCE_DIR}/ #${PANDAROOT_SOURCE_DIR}/ ${PANDAROOT_SOURCE_DIR}/parbase ${PANDAROOT_SOURCE_DIR}/geobase ${PANDAROOT_SOURCE_DIR}/torinoDetector ) include_directories( ${INCLUDE_DIRECTORIES}) set(LINK_DIRECTORIES ${ROOT_LIBRARY_DIR} ) link_directories( ${LINK_DIRECTORIES}) set(PNDTORINODETECTOR_SRCS #Put here your sourcefiles PndTorinoDetector.cxx PndTorinoDetectorContFact.cxx PndTorinoDetectorGeo.cxx PndTorinoDetectorGeoPar.cxx PndTorinoDetectorPoint.cxx ) # fill list of header files from list of source files # by exchanging the file extension CHANGE_FILE_EXTENSION(*.cxx *.h PNDTORINODETECTOR_HEADERS "${PNDTORINODETECTOR_SRCS}") set(PNDTORINODETECTOR_LINKDEF PndTorinoDetectorLinkDef.h) set(PNDTORINODETECTOR_DICTIONARY ${CMAKE_CURRENT_BINARY_DIR}/PndTorinoDetectorDict.cxx) ROOT_GENERATE_DICTIONARY("${PNDTORINODETECTOR_HEADERS}" "${PNDTORINODETECTOR_LINKDEF}" "${PNDTORINODETECTOR_DICTIONARY}" "${INCLUDE_DIRECTORIES}") set(PNDTORINODETECTOR_SRCS ${PNDTORINODETECTOR_SRCS} ${PNDTORINODETECTOR_DICTIONARY}) add_library(PndTorinoDetector SHARED ${PNDTORINODETECTOR_SRCS}) target_link_libraries(PndTorinoDetector ${ROOT_LIBRARIES}) set_target_properties(PndTorinoDetector PROPERTIES ${FAIRROOT_LIBRARY_PROPERTIES}) ################ install ################### install(TARGETS PndTorinoDetector DESTINATION ${CMAKE_BINARY_DIR}/lib)