Fork me on GitHub

source: git/classes/CMakeLists.txt@ 29b722a

Last change on this file since 29b722a 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
RevLine 
[7fe06d6]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
[0feae05]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()
[7fe06d6]30
31add_library(classes OBJECT ${sources} ClassesDict.cxx)
32
33# install public headers
34install(FILES ${headers} DESTINATION include/classes)
[0f5bf9d]35
36# install pcms if they are created
[f08ddc6]37if (NOT ${ROOT_VERSION} VERSION_LESS "6.0.0")
[0f5bf9d]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.