# Create a library called "libPndTorinoDetector2" 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}/pnddata ${PANDAROOT_SOURCE_DIR}/parbase ${PANDAROOT_SOURCE_DIR}/geobase ${PANDAROOT_SOURCE_DIR}/tutorials/torinoDetector ) include_directories( ${INCLUDE_DIRECTORIES}) set(LINK_DIRECTORIES ${ROOT_LIBRARY_DIR} ) link_directories( ${LINK_DIRECTORIES}) set(PNDTORINODETECTOR2_SRCS #Put here your sourcefiles PndTorinoDetector2.cxx PndTorinoDetector2ContFact.cxx PndTorinoDetector2Geo.cxx PndTorinoDetector2GeoPar.cxx PndTorinoDetector2Point.cxx ) # fill list of header files from list of source files # by exchanging the file extension CHANGE_FILE_EXTENSION(*.cxx *.h PNDTORINODETECTOR2_HEADERS "${PNDTORINODETECTOR2_SRCS}") set(PNDTORINODETECTOR2_LINKDEF PndTorinoDetector2LinkDef.h) set(PNDTORINODETECTOR2_DICTIONARY ${CMAKE_CURRENT_BINARY_DIR}/PndTorinoDetector2Dict.cxx) ROOT_GENERATE_DICTIONARY("${PNDTORINODETECTOR2_HEADERS}" "${PNDTORINODETECTOR2_LINKDEF}" "${PNDTORINODETECTOR2_DICTIONARY}" "${INCLUDE_DIRECTORIES}") set(PNDTORINODETECTOR2_SRCS ${PNDTORINODETECTOR2_SRCS} ${PNDTORINODETECTOR2_DICTIONARY}) add_library(PndTorinoDetector2 SHARED ${PNDTORINODETECTOR2_SRCS}) target_link_libraries(PndTorinoDetector2 ${ROOT_LIBRARIES}) set_target_properties(PndTorinoDetector2 PROPERTIES ${FAIRROOT_LIBRARY_PROPERTIES}) ################ install ################### install(TARGETS PndTorinoDetector2 DESTINATION ${CMAKE_BINARY_DIR}/lib)