Skip to content

Commit

Permalink
Merge pull request #390 from JohanMabille/nlohmann_check
Browse files Browse the repository at this point in the history
Required same version of nlohmann_json in dependencies
  • Loading branch information
JohanMabille authored Mar 20, 2024
2 parents 631b7c2 + f8fd348 commit e6d62ff
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 2 deletions.
7 changes: 6 additions & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,12 @@ message(STATUS "XEUS_BUILD_TESTS: ${XEUS_BUILD_TESTS}")
# Dependencies
# ============

set(nlohmann_json_REQUIRED_VERSION 3.2.0)
# nlohmann_json requires libraries that exchange json objects to be linked
# with the same version of nlohmann_json. Therefore this version should be
# the same in all xeus components; to do so, downstream projects should not
# search # directly for nlohmann_json, but rely on find_dependency called by
# find_package(xeus) instead.
set(nlohmann_json_REQUIRED_VERSION 3.11)
set(xtl_REQUIRED_VERSION 0.7)

if (NOT TARGET nlohmann_json)
Expand Down
4 changes: 3 additions & 1 deletion xeusConfig.cmake.in
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,9 @@ set(CMAKE_MODULE_PATH "${CMAKE_CURRENT_LIST_DIR};${CMAKE_MODULE_PATH}")

include(CMakeFindDependencyMacro)
find_dependency(xtl @xtl_REQUIRED_VERSION@)
find_dependency(nlohmann_json @nlohmann_json_REQUIRED_VERSION@)
# nlohmann_json requires libraries that exchange json objects to be linked
# with the same version of nlohmann_json.
find_dependency(nlohmann_json @nlohmann_json_REQUIRED_VERSION@ EXACT)

# This is required when linking with the static target
if(NOT EMSCRIPTEN)
Expand Down

0 comments on commit e6d62ff

Please sign in to comment.