Fork me on GitHub

source: git/classes/CMakeLists.txt@ 7bca620

Last change on this file since 7bca620 was 0feae05, checked in by Valentin Volkl <valentin.volkl@…>, 4 years ago

relocatable headers for dictionaries: workaround for ROOT 5

  • Property mode set to 100644
File size: 1.2 KB
Line 
1include_directories(
2 ${CMAKE_SOURCE_DIR}
3 ${ROOT_INCLUDE_DIRS}
4 ${DelphesExternals_INCLUDE_DIR}
5)
6
7file(GLOB sources *.cc)
8file(GLOB headers *.h)
9list(REMOVE_ITEM headers ${CMAKE_CURRENT_SOURCE_DIR}/ClassesLinkDef.h)
10
11# the macro invocation for ROOT6 ensures that the headers are relocatable
12if (NOT ${ROOT_VERSION} VERSION_LESS "6.0.0")
13 DELPHES_GENERATE_DICTIONARY(ClassesDict
14 classes/DelphesModule.h
15 classes/DelphesFactory.h
16 classes/SortableObject.h
17 classes/DelphesClasses.h
18 LINKDEF ClassesLinkDef.h
19 )
20else()
21 # for ROOT5 the above fails, keep the following as workaround
22 DELPHES_GENERATE_DICTIONARY(ClassesDict
23 ${CMAKE_CURRENT_SOURCE_DIR}/DelphesModule.h
24 ${CMAKE_CURRENT_SOURCE_DIR}/DelphesFactory.h
25 ${CMAKE_CURRENT_SOURCE_DIR}/SortableObject.h
26 ${CMAKE_CURRENT_SOURCE_DIR}/DelphesClasses.h
27 LINKDEF ClassesLinkDef.h
28 )
29endif()
30
31add_library(classes OBJECT ${sources} ClassesDict.cxx)
32
33# install public headers
34install(FILES ${headers} DESTINATION include/classes)
35
36# install pcms if they are created
37if (NOT ${ROOT_VERSION} VERSION_LESS "6.0.0")
38 install(FILES
39 ${PROJECT_BINARY_DIR}/classes/libClassesDict_rdict.pcm
40 DESTINATION lib)
41endif()
Note: See TracBrowser for help on using the repository browser.