From 1f192cc53419b932b1bda9b3a628fee43c1f00cc Mon Sep 17 00:00:00 2001 From: Richard Barnes Date: Thu, 31 Oct 2024 16:56:42 -0400 Subject: [PATCH] Link nlohmann_json at the top level --- CMakeLists.txt | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index eddb1c5d..6be0cc58 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -103,6 +103,9 @@ set(VCPKG_BUILD_TYPE release) # Internal libraries add_subdirectory(lib) +# External libraries +find_package(nlohmann_json REQUIRED) + # Third-Party libraries in tree add_subdirectory(third_party) @@ -118,7 +121,11 @@ file(GLOB_RECURSE LIB_SOURCES CONFIGURE_DEPENDS "${CMAKE_CURRENT_SOURCE_DIR}/src add_library(${LIB_NAME} ${LIB_HEADERS} ${LIB_SOURCES}) add_dependencies(${LIB_NAME} bytes tls_syntax hpke) -target_link_libraries(${LIB_NAME} bytes tls_syntax hpke) +target_link_libraries(${LIB_NAME} + PRIVATE + nlohmann_json::nlohmann_json + PUBLIC + bytes tls_syntax hpke) target_include_directories(${LIB_NAME} PUBLIC $