options for using the system libraries instead of fetch content

This commit is contained in:
Erik Frojdh
2024-03-27 10:50:38 +01:00
parent bf216f55c6
commit 0973580670
4 changed files with 72 additions and 16 deletions

View File

@ -1,8 +1,13 @@
FetchContent_Declare(json
GIT_REPOSITORY https://github.com/nlohmann/json
GIT_TAG v3.11.3
)
FetchContent_MakeAvailable(json)
if(AARE_FETCH_JSON)
FetchContent_Declare(json
GIT_REPOSITORY https://github.com/nlohmann/json
GIT_TAG v3.11.3
)
FetchContent_MakeAvailable(json)
else()
find_package(nlohmann_json 3 REQUIRED)
endif()
set(SourceFiles
${CMAKE_CURRENT_SOURCE_DIR}/src/File.cpp