Skip to content

Commit

Permalink
event/systemd/meson.build: use nlohmann_json_dep
Browse files Browse the repository at this point in the history
  • Loading branch information
MaxKellermann committed Nov 3, 2023
1 parent fa11dc6 commit e8b163a
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 6 deletions.
1 change: 0 additions & 1 deletion src/event/systemd/ResolvedClient.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@
#include "util/Cancellable.hxx"
#include "util/SpanCast.hxx"

#define JSON_NO_IO
#include <nlohmann/json.hpp>
using json = nlohmann::json;

Expand Down
7 changes: 2 additions & 5 deletions src/event/systemd/meson.build
Original file line number Diff line number Diff line change
@@ -1,12 +1,9 @@
event_systemd_sources = []
event_systemd_dependencies = []

nlohmann_json = dependency('nlohmann_json',
version: '>= 3.11',
required: get_variable('libcommon_enable_json', false))
if nlohmann_json.found()
if is_variable('nlohmann_json_dep') and nlohmann_json_dep.found()
event_systemd_sources += 'ResolvedClient.cxx'
event_systemd_dependencies += nlohmann_json
event_systemd_dependencies += nlohmann_json_dep
endif

event_systemd = static_library(
Expand Down

0 comments on commit e8b163a

Please sign in to comment.