mirror of
https://gitlab.freedesktop.org/libinput/libinput.git
synced 2025-12-20 03:20:05 +01:00
meson.build: use the / operator instead of join_paths
Starting with meson v0.49.0, the "/" operator can be used instead of join_paths. Update meson to v0.49.0 and remove all calls to join_paths. Signed-off-by: José Expósito <jose.exposito89@gmail.com>
This commit is contained in:
parent
44212baaf1
commit
375618b81b
3 changed files with 27 additions and 27 deletions
|
|
@ -1,6 +1,6 @@
|
|||
zshcompletiondir = get_option('zshcompletiondir')
|
||||
if zshcompletiondir == ''
|
||||
zshcompletiondir = join_paths(get_option('datadir'), 'zsh', 'site-functions')
|
||||
zshcompletiondir = get_option('datadir') / 'zsh' / 'site-functions'
|
||||
endif
|
||||
|
||||
if zshcompletiondir != 'no'
|
||||
|
|
|
|||
|
|
@ -191,7 +191,7 @@ if yq.found()
|
|||
foreach distro : distributions
|
||||
yq_filter = '.distributions[] | select(.name == "@0@") | .packages | join(" ")'.format(distro)
|
||||
deps = run_command(yq, '-r', yq_filter,
|
||||
join_paths(meson.source_root(), '.gitlab-ci', 'config.yml')).stdout()
|
||||
meson.source_root() / '.gitlab-ci' / 'config.yml').stdout()
|
||||
dependencies_config.set('@0@_PACKAGES'.format(distro.to_upper()), deps)
|
||||
endforeach
|
||||
endif
|
||||
|
|
@ -205,6 +205,6 @@ custom_target('sphinx',
|
|||
input : [ sphinx_conf_py, git_version_page ] + src_sphinx + dst_404s,
|
||||
output : [ sphinx_output_dir ],
|
||||
command : [ sphinx, '-q', '-b', 'html',
|
||||
'-d', join_paths(meson.current_build_dir(), 'doctrees'),
|
||||
'-d', meson.current_build_dir() / 'doctrees',
|
||||
meson.current_build_dir(), sphinx_output_dir],
|
||||
build_by_default : true)
|
||||
|
|
|
|||
48
meson.build
48
meson.build
|
|
@ -2,27 +2,27 @@ project('libinput', 'c',
|
|||
version : '1.18.900',
|
||||
license : 'MIT/Expat',
|
||||
default_options : [ 'c_std=gnu99', 'warning_level=2' ],
|
||||
meson_version : '>= 0.47.0')
|
||||
meson_version : '>= 0.49.0')
|
||||
|
||||
libinput_version = meson.project_version().split('.')
|
||||
|
||||
dir_data = join_paths(get_option('prefix'), get_option('datadir'), 'libinput')
|
||||
dir_etc = join_paths(get_option('prefix'), get_option('sysconfdir'))
|
||||
dir_overrides = join_paths(get_option('prefix'), get_option('sysconfdir'), 'libinput')
|
||||
dir_libexec = join_paths(get_option('prefix'), get_option('libexecdir'), 'libinput')
|
||||
dir_lib = join_paths(get_option('prefix'), get_option('libdir'))
|
||||
dir_man1 = join_paths(get_option('prefix'), get_option('mandir'), 'man1')
|
||||
dir_system_udev = join_paths(get_option('prefix'), 'lib', 'udev')
|
||||
dir_src_quirks = join_paths(meson.current_source_dir(), 'quirks')
|
||||
dir_src_test = join_paths(meson.current_source_dir(), 'test')
|
||||
dir_src = join_paths(meson.current_source_dir(), 'src')
|
||||
dir_data = get_option('prefix') / get_option('datadir') / 'libinput'
|
||||
dir_etc = get_option('prefix') / get_option('sysconfdir')
|
||||
dir_overrides = get_option('prefix') / get_option('sysconfdir') / 'libinput'
|
||||
dir_libexec = get_option('prefix') / get_option('libexecdir') / 'libinput'
|
||||
dir_lib = get_option('prefix') / get_option('libdir')
|
||||
dir_man1 = get_option('prefix') / get_option('mandir') / 'man1'
|
||||
dir_system_udev = get_option('prefix') / 'lib' / 'udev'
|
||||
dir_src_quirks = meson.current_source_dir() / 'quirks'
|
||||
dir_src_test = meson.current_source_dir() / 'test'
|
||||
dir_src = meson.current_source_dir() / 'src'
|
||||
|
||||
dir_udev = get_option('udev-dir')
|
||||
if dir_udev == ''
|
||||
dir_udev = dir_system_udev
|
||||
endif
|
||||
dir_udev_callouts = dir_udev
|
||||
dir_udev_rules = join_paths(dir_udev, 'rules.d')
|
||||
dir_udev_rules = dir_udev / 'rules.d'
|
||||
|
||||
# Collection of man pages, we'll append to that
|
||||
src_man = files()
|
||||
|
|
@ -230,8 +230,8 @@ else
|
|||
if dir_libepoll == ''
|
||||
dir_libepoll = get_option('prefix')
|
||||
endif
|
||||
includes_epoll = include_directories(join_paths(dir_libepoll, 'include/libepoll-shim'))
|
||||
dep_libepoll = cc.find_library('epoll-shim', dirs : join_paths(dir_libepoll, 'lib'))
|
||||
includes_epoll = include_directories(dir_libepoll / 'include' / 'libepoll-shim')
|
||||
dep_libepoll = cc.find_library('epoll-shim', dirs : dir_libepoll / 'lib')
|
||||
code = '''
|
||||
#include <sys/epoll.h>
|
||||
int main(void) { epoll_create1(0); }
|
||||
|
|
@ -269,7 +269,7 @@ foreach h: util_headers
|
|||
output : 'test-util-includes-@0@.c'.format(h),
|
||||
configuration : c)
|
||||
executable('test-build-@0@'.format(h),
|
||||
testfile, join_paths(dir_src, h),
|
||||
testfile, dir_src / h,
|
||||
include_directories : [includes_src, includes_include],
|
||||
install : false)
|
||||
endforeach
|
||||
|
|
@ -316,7 +316,7 @@ dep_libfilter = declare_dependency(link_with : libfilter)
|
|||
|
||||
############ libquirks.a #############
|
||||
libinput_data_path = dir_data
|
||||
libinput_data_override_path = join_paths(dir_overrides, 'local-overrides.quirks')
|
||||
libinput_data_override_path = dir_overrides / 'local-overrides.quirks'
|
||||
config_h.set_quoted('LIBINPUT_QUIRKS_DIR', dir_data)
|
||||
config_h.set_quoted('LIBINPUT_QUIRKS_OVERRIDE_FILE', libinput_data_override_path)
|
||||
|
||||
|
|
@ -400,7 +400,7 @@ libinput_version_h = configure_file(
|
|||
configuration : libinput_version_h_config,
|
||||
)
|
||||
|
||||
mapfile = join_paths(dir_src, 'libinput.sym')
|
||||
mapfile = dir_src / 'libinput.sym'
|
||||
version_flag = '-Wl,--version-script,@0@'.format(mapfile)
|
||||
lib_libinput = shared_library('input',
|
||||
src_libinput,
|
||||
|
|
@ -570,7 +570,7 @@ if get_option('debug-gui')
|
|||
wlproto_dir = dep_wayland_protocols.get_pkgconfig_variable('pkgdatadir')
|
||||
|
||||
proto_name = 'pointer-constraints-unstable-v1'
|
||||
input = files(join_paths(wlproto_dir, 'unstable/pointer-constraints/@0@.xml'.format(proto_name)))
|
||||
input = files(wlproto_dir / 'unstable' / 'pointer-constraints' / '@0@.xml'.format(proto_name))
|
||||
|
||||
wayland_headers = custom_target('@0@ client header'.format(proto_name),
|
||||
input: input,
|
||||
|
|
@ -663,7 +663,7 @@ test('tools-builddir-lookup-installed',
|
|||
|
||||
test('symbols-leak-test',
|
||||
find_program('test/symbols-leak-test'),
|
||||
args : [ join_paths(dir_src, 'libinput.sym'), dir_src],
|
||||
args : [ dir_src / 'libinput.sym', dir_src],
|
||||
suite : ['all'])
|
||||
|
||||
# build-test only
|
||||
|
|
@ -823,11 +823,11 @@ if get_option('tests')
|
|||
|
||||
litest_config_h = configuration_data()
|
||||
litest_config_h.set_quoted('LIBINPUT_DEVICE_GROUPS_RULES_FILE',
|
||||
join_paths(meson.current_build_dir(),
|
||||
'80-libinput-device-groups-litest.rules'))
|
||||
meson.current_build_dir() /
|
||||
'80-libinput-device-groups-litest.rules')
|
||||
litest_config_h.set_quoted('LIBINPUT_FUZZ_OVERRIDE_UDEV_RULES_FILE',
|
||||
join_paths(meson.current_build_dir(),
|
||||
'90-libinput-fuzz-override-litest.rules'))
|
||||
meson.current_build_dir() /
|
||||
'90-libinput-fuzz-override-litest.rules')
|
||||
|
||||
def_no_main = '-DLITEST_NO_MAIN'
|
||||
def_disable_backtrace = '-DLITEST_DISABLE_BACKTRACE_LOGGING'
|
||||
|
|
@ -928,7 +928,7 @@ if get_option('tests')
|
|||
valgrind = find_program('valgrind', required : false)
|
||||
if valgrind.found()
|
||||
valgrind_env = environment()
|
||||
valgrind_suppressions_file = join_paths(dir_src_test, 'valgrind.suppressions')
|
||||
valgrind_suppressions_file = dir_src_test / 'valgrind.suppressions'
|
||||
add_test_setup('valgrind',
|
||||
exe_wrapper : [ valgrind,
|
||||
'--leak-check=full',
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue