Skip to content

Commit 869e989

Browse files
committed
Use system-provided nlohmann-json library
Removes bundled library and instead pulls in system-provided version. The current Debian oldstable as well as Ubuntu >= focal provide the required packages.
1 parent 8de0736 commit 869e989

File tree

6 files changed

+6
-10043
lines changed

6 files changed

+6
-10043
lines changed

Diff for: CMakeLists.txt

+3
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,9 @@ if(BUILD_TESTING)
1313
include(${PROJECT_SOURCE_DIR}/lib/cmake-scripts/include-or-build-gtest.cmake)
1414
endif()
1515

16+
# dependencies
17+
find_package(nlohmann_json REQUIRED)
18+
1619
add_subdirectory(lib)
1720

1821
add_subdirectory(src)

Diff for: lib/CMakeLists.txt

-8
Original file line numberDiff line numberDiff line change
@@ -1,9 +1 @@
11
add_subdirectory(linuxdeploy EXCLUDE_FROM_ALL)
2-
3-
# required to properly build nlohmann/json v. 2.0.0 on trusty
4-
set(CMAKE_CXX_STANDARD 11)
5-
set(CMAKE_CXX_STANDARD_REQUIRED ON)
6-
7-
add_library(json INTERFACE)
8-
set_property(TARGET json PROPERTY INTERFACE_INCLUDE_DIRECTORIES ${CMAKE_CURRENT_SOURCE_DIR}/json/include)
9-
target_sources(json INTERFACE ${CMAKE_CURRENT_SOURCE_DIR}/json/include/json.hpp)

0 commit comments

Comments
 (0)