Skip to content

Commit

Permalink
Merge pull request #3913 from timkpaine/tkp/jsoninterface
Browse files Browse the repository at this point in the history
Only use first include directory in json include directories list
  • Loading branch information
alaindargelas authored Oct 22, 2023
2 parents 5060eb6 + 9241651 commit b76a429
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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 "")
Expand Down

0 comments on commit b76a429

Please sign in to comment.