# Create a library called "libKrattaPartIdent" 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 ${R3BROOT_SOURCE_DIR}/fairtools ${R3BROOT_SOURCE_DIR}/base ${R3BROOT_SOURCE_DIR}/parbase ${R3BROOT_SOURCE_DIR}/KRATTA/krattaTasks/TKratAnaStep1/mktreedst ${R3BROOT_SOURCE_DIR}/KRATTA/krattaTasks/TKratCalib/Swiatowid/KrattaPartIdent ${R3BROOT_SOURCE_DIR}/KRATTA/krattaTasks/TKratCalib/TRootKRATEvent ) include_directories( ${INCLUDE_DIRECTORIES}) set(LINK_DIRECTORIES ${ROOT_LIBRARY_DIR} ) link_directories( ${LINK_DIRECTORIES}) set(R3BCAL_SRCS #Put here your sourcefiles KrattaGrid.cxx KrattaRecognizer.cxx KrattaSlowControl.cxx KrattaSpectrum.cxx ) # fill list of header files from list of source files # by exchanging the file extension CHANGE_FILE_EXTENSION(*.cxx *.hxx R3BCAL_HEADERS "${R3BCAL_SRCS}") set(R3BCAL_LINKDEF KrattaPartIdentLinkDef.h) set(R3BCAL_DICTIONARY ${CMAKE_CURRENT_BINARY_DIR}/KrattaPartIdentDict.cxx) ROOT_GENERATE_DICTIONARY("${R3BCAL_HEADERS}" "${R3BCAL_LINKDEF}" "${R3BCAL_DICTIONARY}" "${INCLUDE_DIRECTORIES}") set(R3BCAL_SRCS ${R3BCAL_SRCS} ${R3BCAL_DICTIONARY}) add_library(KrattaPartIdent SHARED ${R3BCAL_SRCS}) target_link_libraries(KrattaPartIdent ${ROOT_LIBRARIES}) set_target_properties(KrattaPartIdent PROPERTIES ${FAIRROOT_LIBRARY_PROPERTIES}) ################ install ################### install(TARGETS KrattaPartIdent DESTINATION ${CMAKE_BINARY_DIR}/lib)