From 9241651c5b63dfe3d40425c4728edab0e465f822 Mon Sep 17 00:00:00 2001 From: Tim Paine <3105306+timkpaine@users.noreply.github.com> Date: Sat, 21 Oct 2023 19:04:11 -0400 Subject: [PATCH] Only use first include directory in json include directories list --- CMakeLists.txt | 2 ++ 1 file changed, 2 insertions(+) diff --git a/CMakeLists.txt b/CMakeLists.txt index a4f65f2cee..1b944bd22f 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -135,6 +135,8 @@ endif() if (SURELOG_USE_HOST_JSON) find_package(nlohmann_json) get_target_property(JSON_INCLUDE_DIR nlohmann_json::nlohmann_json INTERFACE_INCLUDE_DIRECTORIES) + # the above returns a list of directories that seem to be duplicates, so take the first + list(POP_FRONT JSON_INCLUDE_DIR JSON_INCLUDE_DIR) else() # https://json.nlohmann.me/integration/cmake/#supporting-both set(JSON_BuildTests OFF CACHE INTERNAL "")