From 97011d1f4e98ecb07ff6aadb14d218a8265b4799 Mon Sep 17 00:00:00 2001 From: Paolo Bonzini Date: Thu, 12 Jun 2025 07:38:29 +0200 Subject: [PATCH] meson: use override_find_program/override_dependency Allow projects that use dtc as a subproject to find the tools and library via find_program() and dependency(). This way, for those projects there is no different between system dtc and subproject dtc. Signed-off-by: Paolo Bonzini Message-ID: <20250612053829.1037412-1-pbonzini@redhat.com> Signed-off-by: David Gibson --- libfdt/meson.build | 1 + meson.build | 4 ++++ 2 files changed, 5 insertions(+) diff --git a/libfdt/meson.build b/libfdt/meson.build index 9c6ef54..68d4c1d 100644 --- a/libfdt/meson.build +++ b/libfdt/meson.build @@ -40,6 +40,7 @@ libfdt_dep = declare_dependency( include_directories: libfdt_inc, link_with: libfdt, ) +meson.override_dependency('libfdt', libfdt_dep) if not wheel_only install_headers( diff --git a/meson.build b/meson.build index ed4a39d..66b44e8 100644 --- a/meson.build +++ b/meson.build @@ -118,6 +118,10 @@ if get_option('tools') and not wheel_only ) endif +foreach e: dtc_tools + meson.override_find_program(e.name(), e) +endforeach + if pylibfdt_enabled subdir('pylibfdt') endif