# Create a library called "libkratta" 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} ${CMAKE_SOURCE_DIR}/CAMAC ) include_directories( ${INCLUDE_DIRECTORIES}) set(LINK_DIRECTORIES ${ROOT_LIBRARY_DIR} ) link_directories( ${LINK_DIRECTORIES}) #add_subdirectory (CamacSimul) add_subdirectory (CamacUnpack) # Really lazy version to get the list of source files # Take all source file in the given source dir #FILE(GLOB kratta_SRCS ${CMAKE_CURRENT_SOURCE_DIR} *.cxx) # List of source files #set(kratta_SRCS # #) # list of header files #set(kratta_HEADERS # #) if(RULE_CHECKER_FOUND) CHECK_RULES("${camac_SRCS}" "${INCLUDE_DIRECTORIES}" camac_RULES) endif(RULE_CHECKER_FOUND) # fill list of header files from list of source files # by exchanging the file extension #####################CHANGE_FILE_EXTENSION(*.cxx *.h kratta_HEADERS "${kratta_SRCS}") # set everything needed for the root dictonary and create the # dictionary #set(kratta_LINKDEF krattaLinkDef.h ) #set(kratta_DICTIONARY ${CMAKE_CURRENT_BINARY_DIR}/krattaDict.cxx) #ROOT_GENERATE_DICTIONARY("${kratta_HEADERS}" "${kratta_LINKDEF}" "${kratta_DICTIONARY}" "${INCLUDE_DIRECTORIES}") # add the dictionary to the list of source files #SET(kratta_SRCS ${kratta_SRCS} ${kratta_DICTIONARY}) ############### build the library ##################### #add_library(kratta SHARED ${kratta_SRCS}) #target_link_libraries(kratta ${ROOT_LIBRARIES}) #set_target_properties(kratta PROPERTIES ${FAIRROOT_LIBRARY_PROPERTIES}) ############### install the library ################### #install(TARGETS kratta DESTINATION ${CMAKE_BINARY_DIR}/lib)