mirror of
https://gitlab.freedesktop.org/monado/monado.git
synced 2025-02-03 12:28:07 +00:00
build/meson: Add systemd feature option for monado-service
This commit is contained in:
parent
0adcc179c0
commit
851a600a6a
|
@ -71,6 +71,7 @@ vulkan = dependency('vulkan', required: true)
|
||||||
zlib = dependency('zlib', required: false)
|
zlib = dependency('zlib', required: false)
|
||||||
survive = dependency('survive', required: false)
|
survive = dependency('survive', required: false)
|
||||||
dbus = dependency('dbus-1', required: get_option('dbus'))
|
dbus = dependency('dbus-1', required: get_option('dbus'))
|
||||||
|
systemd = dependency('libsystemd', required: get_option('systemd'))
|
||||||
gst = dependency('gstreamer-1.0', required: false)
|
gst = dependency('gstreamer-1.0', required: false)
|
||||||
gst_app = dependency('gstreamer-app-1.0', required: false)
|
gst_app = dependency('gstreamer-app-1.0', required: false)
|
||||||
gst_video= dependency('gstreamer-video-1.0', required: false)
|
gst_video= dependency('gstreamer-video-1.0', required: false)
|
||||||
|
|
|
@ -77,6 +77,11 @@ option('dbus',
|
||||||
value: 'auto',
|
value: 'auto',
|
||||||
description: 'Enable support for dbus.')
|
description: 'Enable support for dbus.')
|
||||||
|
|
||||||
|
option('systemd',
|
||||||
|
type: 'feature',
|
||||||
|
value: 'auto',
|
||||||
|
description: 'Enable systemd support (for socket activation of service)')
|
||||||
|
|
||||||
option('service',
|
option('service',
|
||||||
type: 'boolean',
|
type: 'boolean',
|
||||||
value: true,
|
value: true,
|
||||||
|
|
|
@ -76,6 +76,10 @@ if dbus.found() and not get_option('dbus').disabled()
|
||||||
have_conf.set('XRT_HAVE_DBUS', true)
|
have_conf.set('XRT_HAVE_DBUS', true)
|
||||||
endif
|
endif
|
||||||
|
|
||||||
|
if systemd.found() and not get_option('systemd').disabled()
|
||||||
|
have_conf.set('XRT_HAVE_SYSTEMD', true)
|
||||||
|
endif
|
||||||
|
|
||||||
if get_option('layer_depth')
|
if get_option('layer_depth')
|
||||||
have_conf.set('XRT_FEATURE_OPENXR_LAYER_DEPTH', true)
|
have_conf.set('XRT_FEATURE_OPENXR_LAYER_DEPTH', true)
|
||||||
endif
|
endif
|
||||||
|
|
|
@ -1,6 +1,11 @@
|
||||||
# Copyright 2020, Collabora, Ltd.
|
# Copyright 2020, Collabora, Ltd.
|
||||||
# SPDX-License-Identifier: BSL-1.0
|
# SPDX-License-Identifier: BSL-1.0
|
||||||
|
|
||||||
|
service_deps = [pthreads, libjpeg]
|
||||||
|
if systemd.found() and not get_option('systemd').disabled()
|
||||||
|
service_deps += systemd
|
||||||
|
endif
|
||||||
|
|
||||||
hack_deps = []
|
hack_deps = []
|
||||||
hack_src = [ '../openxr/oxr_sdl2_hack.c']
|
hack_src = [ '../openxr/oxr_sdl2_hack.c']
|
||||||
hack_libs = []
|
hack_libs = []
|
||||||
|
@ -41,6 +46,6 @@ service = executable(
|
||||||
common_include,
|
common_include,
|
||||||
xrt_include,
|
xrt_include,
|
||||||
] + hack_incs,
|
] + hack_incs,
|
||||||
dependencies: [pthreads, libjpeg] + hack_deps,
|
dependencies: [pthreads, libjpeg] + hack_deps + service_deps,
|
||||||
install: true,
|
install: true,
|
||||||
)
|
)
|
||||||
|
|
Loading…
Reference in a new issue