summaryrefslogtreecommitdiff
path: root/meson.build
diff options
context:
space:
mode:
authorTing-Wei Lan <lantw@src.gnome.org>2018-01-06 03:17:23 +0800
committerRichard Hughes <richard@hughsie.com>2018-01-16 13:59:53 +0000
commit083152519879761379295dcec165a1889465a4d4 (patch)
treef8ff844242fe6bbe7f63b60b2f2b9f531b8cbdfe /meson.build
parent406525b2a74660379f9fb228014277028d5b4d57 (diff)
downloadcolord-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.
Diffstat (limited to 'meson.build')
-rw-r--r--meson.build9
1 files changed, 7 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',