Skip to content

Commit

Permalink
Use the canonical nlohmann json include path
Browse files Browse the repository at this point in the history
As documented in https://github.com/nlohmann/json, the canonical
include path for json.hpp is nlohmann/json.hpp. Tihs updated the
vendored dependency to match, so that gsmartcontrol can more easily be
built using a system-installed copy of nlohmann json as well as the
vendored copy.

Signed-off-by: Stephen Kitt <[email protected]>
  • Loading branch information
skitt committed May 27, 2024
1 parent 844f6ed commit 7b6aa04
Show file tree
Hide file tree
Showing 10 changed files with 9 additions and 9 deletions.
2 changes: 1 addition & 1 deletion dependencies/nlohmann_json/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ add_library(nlohmann_json INTERFACE)

# Relative sources are allowed only since cmake 3.13.
target_sources(nlohmann_json INTERFACE
${CMAKE_CURRENT_SOURCE_DIR}/json/json.hpp
${CMAKE_CURRENT_SOURCE_DIR}/nlohmann/json.hpp
)

target_include_directories(nlohmann_json
Expand Down
File renamed without changes.
2 changes: 1 addition & 1 deletion src/applib/smartctl_json_ata_parser.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ License: GNU General Public License v3.0 only
#include <vector>
#include <chrono>

#include "json/json.hpp"
#include "nlohmann/json.hpp"

#include "storage_property.h"
#include "hz/debug.h"
Expand Down
2 changes: 1 addition & 1 deletion src/applib/smartctl_json_ata_parser.h
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ License: GNU General Public License v3.0 only

#include <string_view>

#include "json/json.hpp"
#include "nlohmann/json.hpp"

#include "hz/error_container.h"
#include "smartctl_parser_types.h"
Expand Down
2 changes: 1 addition & 1 deletion src/applib/smartctl_json_basic_parser.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ License: GNU General Public License v3.0 only
#include "hz/string_algo.h" // string_*
#include "hz/string_num.h" // string_is_numeric, number_to_string
//#include "hz/debug.h" // debug_*
#include "json/json.hpp"
#include "nlohmann/json.hpp"
#include "hz/error_container.h"

//#include "smartctl_text_ata_parser.h"
Expand Down
2 changes: 1 addition & 1 deletion src/applib/smartctl_json_basic_parser.h
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ License: GNU General Public License v3.0 only
//#include <string>
//#include <vector>

#include "json/json.hpp"
#include "nlohmann/json.hpp"

#include "smartctl_parser.h"

Expand Down
2 changes: 1 addition & 1 deletion src/applib/smartctl_json_nvme_parser.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ License: GNU General Public License v3.0 only
#include <vector>
#include <chrono>

#include "json/json.hpp"
#include "nlohmann/json.hpp"

#include "storage_property.h"
#include "hz/debug.h"
Expand Down
2 changes: 1 addition & 1 deletion src/applib/smartctl_json_nvme_parser.h
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ License: GNU General Public License v3.0 only

#include <string_view>

#include "json/json.hpp"
#include "nlohmann/json.hpp"

#include "hz/error_container.h"
#include "smartctl_parser_types.h"
Expand Down
2 changes: 1 addition & 1 deletion src/applib/smartctl_json_parser_helpers.h
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ License: GNU General Public License v3.0 only
#include <string_view>
#include <vector>

#include "json/json.hpp"
#include "nlohmann/json.hpp"
#include "hz/debug.h"
#include "hz/string_algo.h"
#include "smartctl_parser_types.h"
Expand Down
2 changes: 1 addition & 1 deletion src/rconfig/rconfig.h
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ License: Zlib
#ifndef RCONFIG_CONFIG_H
#define RCONFIG_CONFIG_H

#include "json/json.hpp"
#include "nlohmann/json.hpp"

#include <string>
#include <memory>
Expand Down

0 comments on commit 7b6aa04

Please sign in to comment.