1 |
cmake_minimum_required(VERSION 2.6) |
2 |
|
3 |
ADD_DEFINITIONS( |
4 |
-std=c++11 # Or -std=c++0x |
5 |
) |
6 |
|
7 |
project(PamUnfold) |
8 |
|
9 |
include(CMakeFiles/FindROOT.cmake) |
10 |
|
11 |
include_directories(${ROOT_INCLUDE_DIR} inc/) |
12 |
|
13 |
# Generate dictionaries for ROOT classes |
14 |
set(PamUnfold_DICT PamUnfoldDict.cpp) |
15 |
set(PamUnfold_INCDIR ${CMAKE_SOURCE_DIR}/inc) |
16 |
set(PamUnfold_INC |
17 |
${PamUnfold_INCDIR}/RanGen.h |
18 |
${PamUnfold_INCDIR}/PamUnfold.h |
19 |
) |
20 |
set(PamUnfold_INCALL |
21 |
${PamUnfold_INC} |
22 |
${PamUnfold_INCDIR}/PamUnfoldLinkDef.h |
23 |
) |
24 |
|
25 |
add_custom_command( |
26 |
OUTPUT ${PamUnfold_DICT} |
27 |
COMMAND rootcint -f ${PamUnfold_DICT} -c -I${ROOT_INCLUDE_DIR} -I${PamUnfold_INCDIR} ${PamUnfold_INCALL} |
28 |
DEPENDS ${PamUnfold_INC} |
29 |
) |
30 |
|
31 |
add_library(PamUnfold SHARED src/PamUnfold.cpp src/RanGen.cpp ${PamUnfold_DICT}) |
32 |
target_link_libraries(PamUnfold ${ROOT_LIBRARIES} TMVA) |
33 |
|
34 |
install(TARGETS PamUnfold DESTINATION lib) |
35 |
install(FILES ${PamUnfold_INC} DESTINATION include) |
36 |
|