# Create a library called "libTATOFEvent" 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 # put here all directories where the header files are located # ${S254REF}/anal/src/TAGbase # ${S254REF}/anal/src/TAGmbs # ${S254REF}/anal/src/TATbase # ${S254REF}/anal/src/TAFadc # ${S254REF}/anal/src/TAMbase ${ROOT_INCLUDE_DIR} #${BASE_INCLUDE_DIRECTORIES} # contains FairRootManager.h - ALF, 12/2013 ${CMAKE_SOURCE_DIR}/ATOF/AtofUnpack #${CMAKE_SOURCE_DIR}/CommonStruct/TMbsInfo # access to current run - ALF, 12/2013 ) include_directories( ${INCLUDE_DIRECTORIES}) set(LINK_DIRECTORIES ${ROOT_LIBRARY_DIR} # ${CTBREF}/lib # ${S254REF}/anal/lib ) link_directories( ${LINK_DIRECTORIES}) # Really lazy version to get the list of source files # Take all source file in the given source dir #FILE(GLOB TATOFEvent_SRCS ${CMAKE_CURRENT_SOURCE_DIR} *.cxx) # List of source files set(TATOFEvent_SRCS TATOFaction.cxx TATOFdata.cxx TATOFdataDsc.cxx TATOFeventId.cxx TATOFnamed.cxx TATOFobject.cxx TATOFpara.cxx TATOFparaDsc.cxx TATOFparMap.cxx TATOFroot.cxx TATOFrunInfo.cxx TATOFactDatFbus.cxx TATOFparFbusCal.cxx TATOFconfigFile.cxx TATOFdatFbus.cxx TATOFdatRaw.cxx TATOFEvent.cxx # TATOFmbsEvent.cxx # TATOFmbsEventFilter.cxx # TATOFmbsEventFilterType.cxx # TATOFmbsEventInfo.cxx # TATOFtimestamp.cxx # TATOFactMbsReader.cxx # TATOFmbsIStream.cxx ) if(RULE_CHECKER_FOUND) CHECK_RULES("${TATOFEvent_SRCS}" "${INCLUDE_DIRECTORIES}" TATOFEvent_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 TATOFEvent_HEADERS "${TATOFEvent_SRCS}") # Add *.h without *.cxx set(TATOFEvent_HEADERS ${TATOFEvent_HEADERS} # /u/kp3soft/cvsref/s254/500/anal/src/TAGbase/TAGparaDsc.hxx # /u/kp3soft/cvsref/s254/500/anal/src/TAGbase/TAGparMap.hxx ) # fill list of header files from list of source files # by exchanging the file extension # set everything needed for the root dictionary and create the # dictionary set(TATOFEvent_LINKDEF TATOFEventLinkDef.h ) #set(TATOFEvent_LINKDEF # TATOFaction.h # TATOFdata.LinkDef.h # TATOFdataDsc.LinkDef.h # TATOFEvent.LinkDef.h # TATOFeventId.LinkDef.h # TATOFnamed.LinkDef.h # TATOFobject.LinkDef.h # TATOFpara.LinkDef.h # TATOFparaDsc.LinkDef.h # TATOFparMap.LinkDef.h # TATOFroot.LinkDef.h # TATOFrunInfo.LinkDef.h # ) set(TATOFEvent_DICTIONARY ${CMAKE_CURRENT_BINARY_DIR}/TATOFEventDict.cxx) ROOT_GENERATE_DICTIONARY("${TATOFEvent_HEADERS}" "${TATOFEvent_LINKDEF}" "${TATOFEvent_DICTIONARY}" "${INCLUDE_DIRECTORIES}") # add the dictionary to the list of source files SET(TATOFEvent_SRCS ${TATOFEvent_SRCS} ${TATOFEvent_DICTIONARY}) ############### build the library ##################### add_library(TATOFEvent SHARED ${TATOFEvent_SRCS}) target_link_libraries(TATOFEvent ${ROOT_LIBRARIES} # "-L ${CTBREF}/lib" # "-L ${S254REF}/anal/lib" ) set_target_properties(TATOFEvent PROPERTIES ${FAIRROOT_LIBRARY_PROPERTIES}) ############### install the library ################### install(TARGETS TATOFEvent DESTINATION ${CMAKE_BINARY_DIR}/lib)