From 07d2d88fa9bd4f3598f9212b7209f98443b636d9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Rafael=20=C3=81vila=20de=20Esp=C3=ADndola?= Date: Sun, 19 Aug 2018 08:19:11 -0700 Subject: Allow override_find_program to use an executable. With this it is now possible to do foobar = executable('foobar', ...) meson.override_find_program('foobar', foobar) Which is convenient for a project like protobuf which produces both a dependency and a tool. If protobuf is updated to use override_find_program, it can be used as protobuf_dep = dependency('protobuf', version : '>=3.3.1', fallback : ['protobuf', 'protobuf_dep']) protoc_prog = find_program('protoc') --- mesonbuild/build.py | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'mesonbuild/build.py') diff --git a/mesonbuild/build.py b/mesonbuild/build.py index efe58f8..585a8d3 100644 --- a/mesonbuild/build.py +++ b/mesonbuild/build.py @@ -1314,6 +1314,10 @@ class Executable(BuildTarget): # Only linkwithable if using export_dynamic self.is_linkwithable = self.export_dynamic + def description(self): + '''Human friendly description of the executable''' + return self.name + def type_suffix(self): return "@exe" -- cgit v1.1