Skip to content

Commit 2f21cf3

Browse files
committed
feat: make nlohmann a required dependency
1 parent daa432f commit 2f21cf3

File tree

1 file changed

+1
-14
lines changed

1 file changed

+1
-14
lines changed

cmake/IncludeNlohmannJson.cmake

Lines changed: 1 addition & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -15,20 +15,7 @@
1515
# ~~~
1616

1717
function (find_nlohmann_json)
18-
find_package(nlohmann_json CONFIG QUIET)
19-
if (nlohmann_json_FOUND)
20-
return()
21-
endif ()
22-
# As a fall back, try finding the header. Since this is a header-only
23-
# library that is all we need.
24-
find_path(GOOGLE_CLOUD_CPP_NLOHMANN_JSON_HEADER "nlohmann/json.hpp"
25-
REQUIRED)
26-
add_library(nlohmann_json::nlohmann_json UNKNOWN IMPORTED)
27-
set_property(
28-
TARGET nlohmann_json::nlohmann_json
29-
APPEND
30-
PROPERTY INTERFACE_INCLUDE_DIRECTORIES
31-
${GOOGLE_CLOUD_CPP_NLOHMANN_JSON_HEADER})
18+
find_package(nlohmann_json CONFIG REQUIRED)
3219
endfunction ()
3320

3421
find_nlohmann_json()

0 commit comments

Comments
 (0)