# 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}/pnddata #${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)