Skip to content

Commit 14cc5f2

Browse files
committed
fix issues with spack
1 parent beaccd8 commit 14cc5f2

File tree

1 file changed

+14
-9
lines changed

1 file changed

+14
-9
lines changed

analyzers/dataframe/CMakeLists.txt

Lines changed: 14 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11

2-
find_package(ROOT)
2+
find_package(ROOT REQUIRED COMPONENTS ROOTDataFrame ROOTVecOps)
33
include(${ROOT_USE_FILE})
4+
#include("${ROOT_DIR}/modules/RootNewMacros.cmake")
45

56

67
find_package(fccedm)
@@ -12,21 +13,25 @@ set(CMAKE_MODULE_PATH ${CMAKE_CURRENT_SOURCE_DIR}/cmake ${CMAKE_MODULE_PATH})
1213

1314
find_package(FastJet)
1415

15-
include_directories(
16-
${CMAKE_SOURCE_DIR}/analyzers/dataframe
17-
"${FCCEDM_INCLUDE_DIRS}"
18-
${FASTJET_INCLUDE_DIR}
19-
)
2016

21-
file(GLOB sources *.cc)
22-
file(GLOB headers *.h)
2317

18+
get_target_property(EDM4HEP_INCLUDE_DIRS EDM4HEP::edm4hep INTERFACE_INCLUDE_DIRECTORIES)
2419

20+
include_directories(${EDM4HEP_INCLUDE_DIRS} ${podio_INCLUDE_DIR} ${FASTJET_INCLUDE_DIR} ${FCCEDM_INCLUDE_DIRS})
2521

2622
ROOT_GENERATE_DICTIONARY(G__FCCAnalyses MCParticle.h ReconstructedParticle.h ReconstructedParticle2Track.h ReconstructedParticle2MC.h Algorithm.h JetClustering.h LINKDEF LinkDef.h)
2723

24+
25+
file(GLOB sources *.cc)
26+
file(GLOB headers *.h)
2827
add_library(FCCAnalyses SHARED ${sources} ${headers} G__FCCAnalyses.cxx )
29-
target_link_libraries(FCCAnalyses ${FCCEDM_LIBRARIES} ROOT::Physics EDM4HEP::edm4hep podio::podio ${FASTJET_LIBRARY})
28+
target_include_directories(FCCAnalyses PUBLIC
29+
${CMAKE_SOURCE_DIR}/analyzers/dataframe
30+
"${FCCEDM_INCLUDE_DIRS}"
31+
${FASTJET_INCLUDE_DIR}
32+
33+
)
34+
target_link_libraries(FCCAnalyses ${FCCEDM_LIBRARIES} ROOT::Physics ROOT::MathCore ROOT::ROOTVecOps ROOT::ROOTDataFrame EDM4HEP::edm4hep EDM4HEP::edm4hepDict podio::podio ${FASTJET_LIBRARY})
3035

3136
set_target_properties(FCCAnalyses PROPERTIES
3237
PUBLIC_HEADER "${headers}")

0 commit comments

Comments
 (0)