From 6646b803964cc60a25723ac92cf97d4e828a83c3 Mon Sep 17 00:00:00 2001 From: Winter Date: Tue, 26 Mar 2024 23:09:43 -0400 Subject: [PATCH] meson: add missing explicit dependency on nlohmann_json Without this, the Meson setup won't bail out if nlohmann_json is missing, leading to subpar DX (and maybe worse, but I'm not entirely sure). Change-Id: I5913111060226b540dcf003257c99a08e84da0de --- meson.build | 3 +++ src/libcmd/meson.build | 1 + src/libexpr/meson.build | 1 + src/libfetchers/meson.build | 1 + src/libstore/meson.build | 1 + src/libutil/meson.build | 1 + src/nix/meson.build | 1 + tests/unit/meson.build | 3 +++ 8 files changed, 12 insertions(+) diff --git a/meson.build b/meson.build index a4c2bbc14..ca250ce99 100644 --- a/meson.build +++ b/meson.build @@ -214,6 +214,9 @@ deps += gtest toml11 = dependency('toml11', version : '>=3.7.0', required : true) deps += toml11 +nlohmann_json = dependency('nlohmann_json', required : true) +deps += nlohmann_json + # # Build-time tools # diff --git a/src/libcmd/meson.build b/src/libcmd/meson.build index c3782723b..6ef293c8f 100644 --- a/src/libcmd/meson.build +++ b/src/libcmd/meson.build @@ -44,6 +44,7 @@ libcmd = library( boehm, editline, lowdown, + nlohmann_json, ], install : true, # FIXME(Qyriad): is this right? diff --git a/src/libexpr/meson.build b/src/libexpr/meson.build index 7c0555f8f..099279d56 100644 --- a/src/libexpr/meson.build +++ b/src/libexpr/meson.build @@ -139,6 +139,7 @@ libexpr = library( boehm, boost, toml11, + nlohmann_json, ], # for shared.hh include_directories : [ diff --git a/src/libfetchers/meson.build b/src/libfetchers/meson.build index 5eacfd5c4..3809701b7 100644 --- a/src/libfetchers/meson.build +++ b/src/libfetchers/meson.build @@ -28,6 +28,7 @@ libfetchers = library( dependencies : [ liblixstore, liblixutil, + nlohmann_json, ], install : true, # FIXME(Qyriad): is this right? diff --git a/src/libstore/meson.build b/src/libstore/meson.build index 29dbc5e70..7e1c8d548 100644 --- a/src/libstore/meson.build +++ b/src/libstore/meson.build @@ -180,6 +180,7 @@ libstore = library( aws_sdk, aws_s3, aws_sdk_transfer, + nlohmann_json, ], cpp_args : cpp_args, install : true, diff --git a/src/libutil/meson.build b/src/libutil/meson.build index c37e7ae68..ade925bcf 100644 --- a/src/libutil/meson.build +++ b/src/libutil/meson.build @@ -105,6 +105,7 @@ libutil = library( libarchive, brotli, openssl, + nlohmann_json, ], implicit_include_directories : true, install : true, diff --git a/src/nix/meson.build b/src/nix/meson.build index 2585ba3c3..61fc36c9c 100644 --- a/src/nix/meson.build +++ b/src/nix/meson.build @@ -87,6 +87,7 @@ nix = executable( liblixfetchers, liblixmain, boehm, + nlohmann_json, ], install : true, # FIXME(Qyriad): is this right? diff --git a/tests/unit/meson.build b/tests/unit/meson.build index a2e882098..a5523a813 100644 --- a/tests/unit/meson.build +++ b/tests/unit/meson.build @@ -63,6 +63,7 @@ libutil_tester = executable( liblixutil, liblixexpr, liblixutil_test_support, + nlohmann_json, ], ) @@ -127,6 +128,7 @@ libstore_tester = executable( liblixutil, rapidcheck, gtest, + nlohmann_json, ], ) @@ -191,6 +193,7 @@ libexpr_tester = executable( rapidcheck, boehm, gtest, + nlohmann_json, ], )