Skip to content

Commit 577ac8e

Browse files
committed
meson: mctpd_test is only required for mctpd-enabled builds
If we're building without mctpd (ie, no libsystemd), then we won't have a mctpd_test variable defined, so meson will fail: meson.build:156:18: ERROR: Unknown variable "mctpd_test". This builds the test dependencies according to what is enabled instead. Fixes: #102 Signed-off-by: Jeremy Kerr <[email protected]>
1 parent 9614b1a commit 577ac8e

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

meson.build

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -63,6 +63,8 @@ mctp_test = executable('test-mctp',
6363
include_directories: include_directories('src'),
6464
)
6565

66+
test_deps = [mctp_test]
67+
6668
executable('mctp-req',
6769
sources: ['src/mctp-req.c'] + util_sources,
6870
)
@@ -97,6 +99,7 @@ if libsystemd.found()
9799
include_directories: include_directories('src'),
98100
dependencies: [libsystemd, toml_dep],
99101
)
102+
test_deps += mctpd_test
100103
endif
101104

102105
tests = get_option('tests')
@@ -153,7 +156,7 @@ if tests
153156
)
154157

155158
test('test-mctpd', dbus_run_session,
156-
depends: [mctpd_test, mctp_test],
159+
depends: [test_deps],
157160
args: [ sh.full_path(), '-c', script, '--' ],
158161
protocol: 'tap',
159162
)

0 commit comments

Comments
 (0)