Skip to content

Commit

Permalink
[CMake] Don't require json in ROOTConfig if no components specified
Browse files Browse the repository at this point in the history
If components are not specified, we should assume nlohmann_json is not
required. Propagating the dependency on nlohmann_json just for the sake
of one ROOT feature (ROOTEve) that might be used is unreasonable. We can
expect from the users that link against ROOTEve to list this component
explicitly.
  • Loading branch information
guitargeek committed Oct 17, 2024
1 parent bbf6351 commit d91e805
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions cmake/scripts/ROOTConfig.cmake.in
Original file line number Diff line number Diff line change
Expand Up @@ -112,10 +112,11 @@ if (NOT ROOT_builtin_nlohmannjson_FOUND)
set(_need_json TRUE)
endif()
endforeach()
else()
# if components not specified - suppose all
set(_need_json TRUE)
endif()
# If components are not specified, we assume json is not required.
# Propagating the dependency on nlohmann_json just for the sake of one small
# ROOT feature that might be used is unreasonable. We can expect from the
# users that link against ROOTEve to list this component explicitly.
endif()

if(_need_json)
Expand Down

0 comments on commit d91e805

Please sign in to comment.