Skip to content

Commit

Permalink
Update required cmake version for fetchContent and add openPMD interf…
Browse files Browse the repository at this point in the history
…ace library for nlohmann_json
  • Loading branch information
DerNils-git committed Jul 19, 2023
1 parent 620d861 commit 6136a97
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Preamble ####################################################################
#
cmake_minimum_required(VERSION 3.15.0)
cmake_minimum_required(VERSION 3.24.0)

project(openPMD VERSION 0.16.0) # LANGUAGES CXX

Expand Down Expand Up @@ -265,7 +265,7 @@ if(NOT nlohmann_json_FOUND)
FetchContent_Declare(
nlohmann_json
GIT_REPOSITORY https://github.com/nlohmann/json.git
GIT_TAG 6af826d0bdb55e4b69e3ad817576745335f243ca
GIT_TAG db78ac1d7716f56fc9f1b030b715f872f93964e4#6af826d0bdb55e4b69e3ad817576745335f243ca
OVERRIDE_FIND_PACKAGE
)

Expand All @@ -274,6 +274,10 @@ if(NOT nlohmann_json_FOUND)

FetchContent_MakeAvailable(nlohmann_json)
endif()
add_library(openPMD::thirdparty::nlohmann_json INTERFACE IMPORTED)
target_link_libraries(openPMD::thirdparty::nlohmann_json
INTERFACE nlohmann_json::nlohmann_json)


# external library: toml11
if(openPMD_USE_INTERNAL_TOML11)
Expand Down

0 comments on commit 6136a97

Please sign in to comment.