60 lines
1.6 KiB
Meson
60 lines
1.6 KiB
Meson
# Copyright 2021 Clayton Craft
|
|
# SPDX-License-Identifier: GPL-3.0-or-later
|
|
|
|
unl0kr_sources = files(
|
|
'backends.c',
|
|
'command_line.c',
|
|
'config.c',
|
|
'main.c',
|
|
'sq2lv_layouts.c',
|
|
'terminal.c'
|
|
)
|
|
|
|
unl0kr_dependencies = [
|
|
common_dependencies,
|
|
depxkbcommon
|
|
]
|
|
|
|
unl0kr_args = []
|
|
|
|
deplibdrm = dependency('libdrm', required: get_option('with-drm'))
|
|
if deplibdrm.found()
|
|
unl0kr_dependencies += deplibdrm
|
|
unl0kr_args += '-DLV_USE_LINUX_DRM=1'
|
|
else
|
|
unl0kr_args += '-DLV_USE_LINUX_DRM=0'
|
|
endif
|
|
|
|
executable('unl0kr',
|
|
include_directories: common_include_dirs,
|
|
sources: unl0kr_sources + shared_sources + squeek2lvgl_sources + lvgl_sources,
|
|
dependencies: unl0kr_dependencies,
|
|
c_args: unl0kr_args,
|
|
install: true
|
|
)
|
|
|
|
install_data('unl0kr.conf', install_dir: get_option('sysconfdir'))
|
|
|
|
depsystemd = dependency('systemd', required: get_option('systemd-password-agent'))
|
|
if depsystemd.found()
|
|
executable('unl0kr-agent',
|
|
sources: files('unl0kr-agent.c'),
|
|
dependencies: depinih,
|
|
c_args: '-DUNL0KR_BINARY="@0@"'.format(get_option('prefix') / get_option('bindir') / 'unl0kr'),
|
|
install: true,
|
|
install_dir: get_option('libexecdir')
|
|
)
|
|
|
|
system_unit_dir = depsystemd.get_variable(pkgconfig: 'systemd_system_unit_dir')
|
|
|
|
install_data('unl0kr-agent.path', install_dir: system_unit_dir)
|
|
|
|
configure_file(
|
|
configuration: {'LIBEXECDIR': get_option('prefix') / get_option('libexecdir')},
|
|
input: 'unl0kr-agent.service.in',
|
|
output: 'unl0kr-agent.service',
|
|
install: true,
|
|
install_dir: system_unit_dir
|
|
)
|
|
endif
|