summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRichard Hughes <richard@hughsie.com>2017-08-14 19:54:39 +0100
committerRichard Hughes <richard@hughsie.com>2017-08-14 19:54:41 +0100
commit1c41dd484ac13715b37239991f2e0a5defd6a9ea (patch)
tree05c3df4b4337256aebc9a8a6ed583b41c9e3b1ee
parent98cf67bf3ffe2e6ccb629e3bcaf9a6b15dfd79ed (diff)
downloadcolord-wip/hughsie/no-systemd.tar.gz
Add the meson -Denable-systemd=false configure argumentwip/hughsie/no-systemd
Compiling with systemd is turned on by default, obviously. If you turn this configure option off, and colord breaks, you get to keep all the shards of broken glass. It's 100% untested, so caveat emptor.
-rw-r--r--contrib/session-helper/meson.build16
-rw-r--r--data/meson.build24
-rw-r--r--meson.build8
-rw-r--r--meson_options.txt1
-rw-r--r--src/meson.build7
5 files changed, 36 insertions, 20 deletions
diff --git a/contrib/session-helper/meson.build b/contrib/session-helper/meson.build
index 6b6bae0..ffff770 100644
--- a/contrib/session-helper/meson.build
+++ b/contrib/session-helper/meson.build
@@ -15,13 +15,15 @@ con2.set('servicedir',
get_option('libexecdir')))
# replace @servicedir@
-configure_file(
- input : 'colord-session.service.in',
- output : 'colord-session.service',
- configuration : con2,
- install: true,
- install_dir: systemd.get_pkgconfig_variable('systemduserunitdir'),
-)
+if get_option('enable-systemd')
+ configure_file(
+ input : 'colord-session.service.in',
+ output : 'colord-session.service',
+ configuration : con2,
+ install: true,
+ install_dir: systemd.get_pkgconfig_variable('systemduserunitdir'),
+ )
+endif
# replace @servicedir@
configure_file(
diff --git a/data/meson.build b/data/meson.build
index 86957b2..f5ce3a7 100644
--- a/data/meson.build
+++ b/data/meson.build
@@ -6,9 +6,11 @@ subdir('ref')
subdir('tests')
subdir('ti1')
-install_data('colord.conf',
- install_dir: systemd.get_pkgconfig_variable('tmpfilesdir')
-)
+if get_option('enable-systemd')
+ install_data('colord.conf',
+ install_dir: systemd.get_pkgconfig_variable('tmpfilesdir')
+ )
+endif
if get_option('enable-bash-completion')
install_data('colormgr',
@@ -23,13 +25,15 @@ con2.set('servicedir',
con2.set('daemon_user', get_option('with-daemon-user'))
# replace @servicedir@ and @daemon_user@
-configure_file(
- input : 'colord.service.in',
- output : 'colord.service',
- configuration : con2,
- install: true,
- install_dir: systemd.get_pkgconfig_variable('systemdsystemunitdir'),
-)
+if get_option('enable-systemd')
+ configure_file(
+ input : 'colord.service.in',
+ output : 'colord.service',
+ configuration : con2,
+ install: true,
+ install_dir: systemd.get_pkgconfig_variable('systemdsystemunitdir'),
+ )
+endif
# replace @servicedir@ and @daemon_user@
configure_file(
diff --git a/meson.build b/meson.build
index cdbf8b5..227e736 100644
--- a/meson.build
+++ b/meson.build
@@ -114,14 +114,18 @@ gmodule = dependency('gmodule-2.0')
giounix = dependency('gio-unix-2.0', version : '>= 2.45.8')
lcms = dependency('lcms2', version : '>= 2.6')
sqlite = dependency('sqlite3')
-systemd = dependency('systemd')
-libsystemd = dependency('libsystemd')
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-systemd')
+ systemd = dependency('systemd')
+ libsystemd = dependency('libsystemd')
+ conf.set('HAVE_SYSTEMD', '1')
+endif
+
if cc.has_header('pwd.h')
conf.set('HAVE_PWD_H', '1')
endif
diff --git a/meson_options.txt b/meson_options.txt
index 2904da5..a0e8c65 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-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')
option('enable-reverse', type : 'boolean', value : false, description : 'Enable reverse engineering tools')
diff --git a/src/meson.build b/src/meson.build
index 6c864e5..2b05a90 100644
--- a/src/meson.build
+++ b/src/meson.build
@@ -25,6 +25,11 @@ resources_src = gnome.compile_resources(
dependencies : generated_iccs,
)
+colord_extra_deps = []
+if get_option('enable-systemd')
+ colord_extra_deps += libsystemd
+endif
+
executable(
'colord',
resources_src,
@@ -52,12 +57,12 @@ executable(
root_incdir,
],
dependencies : [
+ colord_extra_deps,
giounix,
gmodule,
gudev,
gusb,
lcms,
- libsystemd,
polkit,
sqlite,
],