summaryrefslogtreecommitdiffstats
path: root/meson.build
diff options
context:
space:
mode:
authorGeorge Kiagiadakis <george.kiagiadakis@collabora.com>2021-07-14 13:27:40 +0300
committerGeorge Kiagiadakis <george.kiagiadakis@collabora.com>2021-07-28 13:19:02 +0300
commitb6f553a33e751ad51abf036ab0ce7b01ee99e39a (patch)
treecde6ad9709084103d826ba57b4ba2a84f0060275 /meson.build
parent4ad92cc00f6beb6e29c36b7c8316df9b7360903d (diff)
server: add systemd units + socket-activation support
Signed-off-by: George Kiagiadakis <george.kiagiadakis@collabora.com>
Diffstat (limited to 'meson.build')
-rw-r--r--meson.build11
1 files changed, 10 insertions, 1 deletions
diff --git a/meson.build b/meson.build
index 0359271..259e94e 100644
--- a/meson.build
+++ b/meson.build
@@ -9,7 +9,12 @@ project('icipc', ['c'],
)
threads_dep = dependency('threads', required: true)
-pipewire_dep = dependency('libpipewire-0.3', required: get_option('server'))
+libsystemd_dep = dependency('libsystemd', required: get_option('systemd'))
+
+if get_option('server')
+ pipewire_dep = dependency('libpipewire-0.3', required: true)
+ systemd_dep = dependency('systemd', required: get_option('systemd'))
+endif
pkgconfig = import('pkgconfig')
cc = meson.get_compiler('c')
@@ -35,6 +40,10 @@ common_flags = [
add_project_arguments(cc.get_supported_arguments(common_flags), language: 'c')
add_project_arguments('-D_GNU_SOURCE', language: 'c')
+if libsystemd_dep.found()
+ add_project_arguments('-DHAVE_SYSTEMD', language: 'c')
+endif
+
subdir('lib')
subdir('src')
subdir('tests')