# Create a library called "libPixelTo3" 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}/PixelTo3 ) include_directories( ${INCLUDE_DIRECTORIES}) set(LINK_DIRECTORIES ${ROOT_LIBRARY_DIR} ) link_directories( ${LINK_DIRECTORIES}) set(PIXELTO3_SRCS #Put here your sourcefiles PixelTo3.cxx PixelTo3ContFact.cxx PixelTo3Geo.cxx PixelTo3GeoPar.cxx PixelTo3Point.cxx ) # fill list of header files from list of source files # by exchanging the file extension CHANGE_FILE_EXTENSION(*.cxx *.h PIXELTO3_HEADERS "${PIXELTO3_SRCS}") set(PIXELTO3_LINKDEF PixelTo3LinkDef.h) set(PIXELTO3_DICTIONARY ${CMAKE_CURRENT_BINARY_DIR}/PixelTo3Dict.cxx) ROOT_GENERATE_DICTIONARY("${PIXELTO3_HEADERS}" "${PIXELTO3_LINKDEF}" "${PIXELTO3_DICTIONARY}" "${INCLUDE_DIRECTORIES}") set(PIXELTO3_SRCS ${PIXELTO3_SRCS} ${PIXELTO3_DICTIONARY}) add_library(PixelTo3 SHARED ${PIXELTO3_SRCS}) target_link_libraries(PixelTo3 ${ROOT_LIBRARIES}) set_target_properties(PixelTo3 PROPERTIES ${FAIRROOT_LIBRARY_PROPERTIES}) ################ install ################### install(TARGETS PixelTo3 DESTINATION ${CMAKE_BINARY_DIR}/lib)