# Create a library called "libKratMktreedst" 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 ${CMAKE_SOURCE_DIR}/fairtools ${CMAKE_SOURCE_DIR}/base ${CMAKE_SOURCE_DIR}/r3bbase ${CMAKE_SOURCE_DIR}/KRATTA/krattaTasks/TKratAnaStep1/mktreedst ${CMAKE_SOURCE_DIR}/KRATTA/krattaTasks/TKratAnaStep1/mktreedst/geo ${CMAKE_SOURCE_DIR}/parbase ${CMAKE_SOURCE_DIR}/geobase ) include_directories( ${INCLUDE_DIRECTORIES}) set(LINK_DIRECTORIES ${ROOT_LIBRARY_DIR} ) link_directories( ${LINK_DIRECTORIES}) set(KratMktreedst_SRCS #Put here your sourcefiles geo/geo.cxx mktreedstchain_sct_fitABC.cxx ) # fill list of header files from list of source files # by exchanging the file extension CHANGE_FILE_EXTENSION(*.cxx *.h KratMktreedst_HEADERS "${KratMktreedst_SRCS}") set(KratMktreedst_LINKDEF KratMktreedstLinkDef.h) set(KratMktreedst_DICTIONARY ${CMAKE_CURRENT_BINARY_DIR}/KratMktreedstDict.cxx) ROOT_GENERATE_DICTIONARY("${KratMktreedst_HEADERS}" "${KratMktreedst_LINKDEF}" "${KratMktreedst_DICTIONARY}" "${INCLUDE_DIRECTORIES}") set(KratMktreedst_SRCS ${KratMktreedst_SRCS} ${KratMktreedst_DICTIONARY}) add_library( KratMktreedst SHARED ${KratMktreedst_SRCS}) target_link_libraries( KratMktreedst ${ROOT_LIBRARIES}) set_target_properties( KratMktreedst PROPERTIES ${FAIRROOT_LIBRARY_PROPERTIES}) ################ install ################### install(TARGETS KratMktreedst DESTINATION ${CMAKE_BINARY_DIR}/lib)