PROJECT(TestChamber) ENABLE_TESTING() INCLUDE_DIRECTORIES($ENV{ROOTSYS}/include ./..) SET(SOURCES ../TpcSample.cxx ../TpcDigi.cxx ../McId.cxx ../McIdCollection.cxx testChamberDict.cxx dataReader.C) FIND_PROGRAM(ROOT_CINT_EXECUTABLE NAMES rootcint PATHS $ENV{ROOTSYS}/bin NO_DEFAULT_PATH ) ADD_CUSTOM_COMMAND(OUTPUT testChamberDict.cxx COMMAND ${ROOT_CINT_EXECUTABLE} ARGS -f testChamberDict.cxx -c -DHAVE_CONFIG_H ${INCLUDE_DIRECTORIES} ../TpcSample.h ../TpcDigi.h ../McId.h ../McIdCollection.h testChamberLinkDef.h) ADD_LIBRARY(testChamber SHARED ${SOURCES}) #add ROOT lib SET(ROOT_LIB $ENV{ROOTSYS}/lib) SET(ROOT_LIBS ${ROOT_LIB}/libCore.so ${ROOT_LIB}/libCint.so ${ROOT_LIB}/libHist.so ${ROOT_LIB}/libGraf.so ${ROOT_LIB}/libGraf3d.so ${ROOT_LIB}/libGpad.so ${ROOT_LIB}/libTree.so ${ROOT_LIB}/libRint.so ${ROOT_LIB}/libPostscript.so ${ROOT_LIB}/libMatrix.so ${ROOT_LIB}/libPhysics.so libdl.so libm.so) TARGET_LINK_LIBRARIES(testChamber ${ROOT_LIBS}) # executable ADD_EXECUTABLE(testChamberReco testChamberReco.cxx) TARGET_LINK_LIBRARIES(testChamberReco testChamber) TARGET_LINK_LIBRARIES(testChamberReco ${ROOT_LIBS})