From 15307c7e2cc96779457ab5528d28f2a026d2f06e Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Sun, 8 Feb 2026 01:52:40 +0000 Subject: [PATCH 1/2] Initial plan From 378b5cf10143667a37a9da17c3b8c27cbf4d75b7 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Sun, 8 Feb 2026 01:56:07 +0000 Subject: [PATCH 2/2] Fix nlohmann_json linkage from PRIVATE to PUBLIC Change target_link_libraries for nlohmann_json from PRIVATE to PUBLIC since nlohmann::json types are exposed in public headers (casbin_types.h, evaluator.h, and data_types.h). This ensures proper propagation of the dependency to downstream consumers and prevents ABI mismatches when multiple versions of nlohmann_json are present. Co-authored-by: hsluoyz <3787410+hsluoyz@users.noreply.github.com> --- casbin/CMakeLists.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/casbin/CMakeLists.txt b/casbin/CMakeLists.txt index cc51e164..4ba5d115 100644 --- a/casbin/CMakeLists.txt +++ b/casbin/CMakeLists.txt @@ -77,7 +77,7 @@ add_library(casbin STATIC ${CASBIN_SOURCE_FILES}) target_precompile_headers(casbin PRIVATE ${CASBIN_INCLUDE_DIR}/casbin/pch.h) target_include_directories(casbin PRIVATE ${CASBIN_INCLUDE_DIR}) -target_link_libraries(casbin PRIVATE nlohmann_json::nlohmann_json) +target_link_libraries(casbin PUBLIC nlohmann_json::nlohmann_json) set_target_properties(casbin PROPERTIES PREFIX ""