diff options
author | Ting-Wei Lan <lantw@src.gnome.org> | 2018-01-06 03:17:23 +0800 |
---|---|---|
committer | Richard Hughes <richard@hughsie.com> | 2018-01-16 13:59:53 +0000 |
commit | 083152519879761379295dcec165a1889465a4d4 (patch) | |
tree | f8ff844242fe6bbe7f63b60b2f2b9f531b8cbdfe | |
parent | 406525b2a74660379f9fb228014277028d5b4d57 (diff) | |
download | colord-083152519879761379295dcec165a1889465a4d4.tar.gz |
Make udev rules installation optional
udev rules are only useful on Linux and udevdir is the only variable
provided by udev.pc. It is not meaningful to ask other operating systems
which reimplement udev API to provide a dummy udev.pc file.
-rw-r--r-- | meson.build | 9 | ||||
-rw-r--r-- | meson_options.txt | 1 |
2 files changed, 8 insertions, 2 deletions
diff --git a/meson.build b/meson.build index 559a28f..ead7a7d 100644 --- a/meson.build +++ b/meson.build @@ -117,9 +117,12 @@ sqlite = dependency('sqlite3') gusb = dependency('gusb', version : '>= 0.2.7') gudev = dependency('gudev-1.0') libm = cc.find_library('m', required: false) -udev = dependency('udev') libudev = dependency('libudev') +if get_option('enable-udev-rules') + udev = dependency('udev') +endif + if get_option('enable-systemd') systemd = dependency('systemd') libsystemd = dependency('libsystemd') @@ -253,7 +256,9 @@ if get_option('enable-man') subdir('man') endif subdir('policy') -subdir('rules') +if get_option('enable-udev-rules') + subdir('rules') +endif subdir('src') meson.add_install_script('meson_post_install.sh', diff --git a/meson_options.txt b/meson_options.txt index a0e8c65..05aa12a 100644 --- a/meson_options.txt +++ b/meson_options.txt @@ -1,5 +1,6 @@ option('enable-session-example', type : 'boolean', value : false, description : 'Enable session example') option('enable-bash-completion', type : 'boolean', value : true, description : 'Enable bash completion') +option('enable-udev-rules', type: 'boolean', value: true, description: 'Install udev rules') option('enable-systemd', type : 'boolean', value : true, description : 'Enable systemd integration') option('enable-libcolordcompat', type : 'boolean', value : false, description : 'Enable libcolordcompat.so which is used by ArgyllCMS') option('enable-argyllcms-sensor', type : 'boolean', value : true, description : 'Enable ArgllCMS sensor') |