cmake_minimum_required(VERSION 2.6) ADD_DEFINITIONS( -std=c++11 # Or -std=c++0x ) project(PamUnfold) include(CMakeFiles/FindROOT.cmake) include_directories(${ROOT_INCLUDE_DIR} inc/) # Generate dictionaries for ROOT classes set(PamUnfold_DICT PamUnfoldDict.cpp) set(PamUnfold_INCDIR ${CMAKE_SOURCE_DIR}/inc) set(PamUnfold_INC ${PamUnfold_INCDIR}/RanGen.h ${PamUnfold_INCDIR}/PamUnfold.h ) set(PamUnfold_INCALL ${PamUnfold_INC} ${PamUnfold_INCDIR}/PamUnfoldLinkDef.h ) add_custom_command( OUTPUT ${PamUnfold_DICT} COMMAND rootcint -f ${PamUnfold_DICT} -c -I${ROOT_INCLUDE_DIR} -I${PamUnfold_INCDIR} ${PamUnfold_INCALL} DEPENDS ${PamUnfold_INC} ) add_library(PamUnfold SHARED src/PamUnfold.cpp src/RanGen.cpp ${PamUnfold_DICT}) target_link_libraries(PamUnfold ${ROOT_LIBRARIES} TMVA) install(TARGETS PamUnfold DESTINATION lib) install(FILES ${PamUnfold_INC} DESTINATION include)