From d205ba3c4efddd6e702087996318a40888bc36c5 Mon Sep 17 00:00:00 2001 From: Andre Sailer Date: Fri, 18 Oct 2024 13:29:27 +0200 Subject: [PATCH] CMake: explicitly ask for ROOTEve component ROOT no longer finds nlohmann_json unless we ask for the ROOTEve component, so we ask for the ROOTEve component if the ROOTEve component exists. DDEve and one executable in UtilityApps depend on this --- CMakeLists.txt | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/CMakeLists.txt b/CMakeLists.txt index 6dc059e2e..e7095e914 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -126,6 +126,12 @@ dd4hep_configure_output( OUTPUT "${PROJECT_BINARY_DIR}" INSTALL "${CMAKE_INSTALL # Configure ROOT find_package (ROOT 6.08 REQUIRED CONFIG) DD4HEP_SETUP_ROOT_TARGETS() +# ROOT no longer finds nlohmann_json unless we ask for the ROOTEve component, so we ask +# for the ROOTEve component if the ROOTEve component exists. +# DDEve and one executable in UtilityApps depend on this +if(TARGET ROOT::ROOTEve) + find_package (ROOT REQUIRED COMPONENTS ROOTEve CONFIG) +endif() # Configure BOOST find_package(Boost 1.49 REQUIRED)