From 2b9f9710503d951ba02fd78fb0564aed27fd7927 Mon Sep 17 00:00:00 2001 From: Thomas Madlener Date: Wed, 23 Oct 2024 16:32:19 +0200 Subject: [PATCH] Make nlohmman_json version a single point of configuration Co-authored-by: Andre Sailer --- CMakeLists.txt | 3 ++- cmake/EDM4HEPConfig.cmake.in | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 5ae17155..5b17974d 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -14,7 +14,8 @@ find_package(ROOT REQUIRED COMPONENTS RIO Tree Physics) option(EDM4HEP_WITH_JSON "Whether or not to build EDM4HEP with JSON support (and edm4hep2json)" ON) if (EDM4HEP_WITH_JSON) - find_package(nlohmann_json 3.10.5 REQUIRED) + set(EDM4HEP_NLOHMANN_JSON_VERSION 3.10.5) + find_package(nlohmann_json ${EDM4HEP_NLOHMANN_JSON_VERSION} REQUIRED) endif() include(cmake/Key4hepConfig.cmake) diff --git a/cmake/EDM4HEPConfig.cmake.in b/cmake/EDM4HEPConfig.cmake.in index 032d275e..7046fc54 100644 --- a/cmake/EDM4HEPConfig.cmake.in +++ b/cmake/EDM4HEPConfig.cmake.in @@ -16,7 +16,7 @@ find_dependency(podio REQUIRED) set(EDM4HEP_WITH_JSON @EDM4HEP_WITH_JSON@) if (EDM4HEP_WITH_JSON) - find_dependency(nlohmann_json 3.10.5 REQUIRED) + find_dependency(nlohmann_json @EDM4HEP_NLOHMANN_JSON_VERSION@ REQUIRED) endif() # - Include the targets file to create the imported targets that a client can