From 7cd28955a076f08b6b9fa999429a2a506e314af0 Mon Sep 17 00:00:00 2001 From: Alyssa Ross Date: Sun, 12 Feb 2023 17:30:43 +0000 Subject: [PATCH] build: allow installing examples to be disabled In Nixpkgs, sysconfdir is not writeable in the sandbox in which packages are built, so it's important for us to be able to disable installing example files. (We create configuration files and install them into /etc separately through our "module system".) Signed-off-by: Alyssa Ross --- meson.build | 6 ++++-- meson_options.txt | 1 + 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/meson.build b/meson.build index 9af10570..92788236 100644 --- a/meson.build +++ b/meson.build @@ -390,8 +390,10 @@ version_conf = { subdir('po') subdir('data') -subdir('data/dispatcher-connection') -subdir('data/dispatcher-fcc-unlock') +if get_option('examples') + subdir('data/dispatcher-connection') + subdir('data/dispatcher-fcc-unlock') +endif subdir('introspection') subdir('include') diff --git a/meson_options.txt b/meson_options.txt index 3c8b888b..4181f9e5 100644 --- a/meson_options.txt +++ b/meson_options.txt @@ -4,6 +4,7 @@ option('udev', type: 'boolean', value: true, description: 'enable udev support') option('udevdir', type: 'string', value: '', description: 'udev base directory') +option('examples', type: 'boolean', value: true, description: 'install examples') option('tests', type: 'boolean', value: true, description: 'enable tests') option('dbus_policy_dir', type: 'string', value: '', description: 'd-bus system policy directory')