Skip to content

Commit

Permalink
build: fix -Dtools=false build
Browse files Browse the repository at this point in the history
When configuring the project, meson fails with:
tests/meson.build:107:27: ERROR: Unknown variable "util_dep"

Declare the util_dep dependency regardless if 'tools' are enabled, so
tests can be built with it.

Fixes: bdc5c87 ("meson: allow disabling tests")
Signed-off-by: Marc-André Lureau <[email protected]>
  • Loading branch information
elmarco committed Nov 13, 2024
1 parent 2d10aa2 commit 6203dc4
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions meson.build
Original file line number Diff line number Diff line change
Expand Up @@ -61,16 +61,16 @@ version_gen_h = vcs_tag(
subdir('libfdt')

dtc_tools = []
util_dep = declare_dependency(
sources: ['util.c', version_gen_h],
include_directories: '.',
dependencies: libfdt_dep
)

if get_option('tools')
flex = find_program('flex', required: true)
bison = find_program('bison', required: true)

util_dep = declare_dependency(
sources: ['util.c', version_gen_h],
include_directories: '.',
dependencies: libfdt_dep
)

lgen = generator(
flex,
output: '@[email protected]',
Expand Down

0 comments on commit 6203dc4

Please sign in to comment.