From 8e0abd0b4c760fdc33a0c3ec94bf671b7b3ad9fc Mon Sep 17 00:00:00 2001 From: Luca Boccassi Date: Wed, 7 Jan 2026 19:29:02 +0100 Subject: [PATCH] meson: do not install standalone binaries if the meson option is disabled A recent commit made the standalone binaries always buildable on demand, but as a side effect due to how 'meson install' works, they are always built and installed by 'meson install' even if the standalone-binaries= option is disabled. Fix it so that 'meson install' only installs them if the option is explicitly enabled, while still allowing building them on demand. Follow-up for 54492552a1ba96e5160a8e9f867e1c49ffc87bc0 --- meson.build | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/meson.build b/meson.build index 89f9f0fd69..b657d4fae0 100644 --- a/meson.build +++ b/meson.build @@ -2496,7 +2496,7 @@ foreach dict : executables foreach key, val : dict if key in ['name', 'dbus', 'public', 'conditions', 'type', 'suite', 'timeout', 'parallel', 'objects', 'sources', 'extract', - 'include_directories', 'build_by_default'] + 'include_directories', 'build_by_default', 'install'] continue endif @@ -2539,6 +2539,12 @@ foreach dict : executables build_by_default = dict.get('build_by_default', have_standalone_binaries or not is_standalone) + if not is_standalone + install = dict.get('install', true) + else + install = have_standalone_binaries + endif + exe = executable( name, sources : exe_sources, @@ -2546,6 +2552,7 @@ foreach dict : executables implicit_include_directories : false, include_directories : include_directories, build_by_default: build_by_default, + install: install, ) executables_by_name += { name : exe }