do not fetch nlohmann_json if it already added in main project (#287)

This commit is contained in:
andrejlevkovitch 2023-09-22 16:12:57 +02:00 committed by GitHub
parent 79535fe0b6
commit 0be4d4c4b5
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -80,6 +80,7 @@ endif ()
]==============================================================================================]
set(fetch_packages "")
if (NOT TARGET nlohmann_json)
# Fetch/Find nlohmann_json
# TODO: Remove when bumping cmake >= 3.24
if (CMAKE_VERSION VERSION_GREATER_EQUAL 3.24)
@ -101,6 +102,7 @@ else ()
list(APPEND fetch_packages nlohmann_json)
endif ()
endif ()
endif ()
# Handle configure flags
if (JSON_VALIDATOR_INSTALL)