[meson] Use / instead join_paths

We need some of the very recent features of meson, let's use the new features also
This commit is contained in:
Ebrahim Byagowi 2020-05-21 17:01:04 +04:30
parent b8d1760bc0
commit f7562672f9
6 changed files with 18 additions and 18 deletions

View File

@ -50,8 +50,8 @@ endif
gnome.gtkdoc('harfbuzz',
main_sgml: 'harfbuzz-docs.xml',
src_dir: [join_paths(meson.current_source_dir(), '..'),
join_paths(meson.current_build_dir(), '..'),
src_dir: [meson.current_source_dir() / '..',
meson.current_build_dir() / '..',
],
scan_args: ['--deprecated-guards=HB_DISABLE_DEPRECATED',
'--ignore-decorators=HB_EXTERN',

View File

@ -1,5 +1,5 @@
project('harfbuzz', 'c', 'cpp',
meson_version: '>= 0.47.0',
meson_version: '>= 0.53.0',
default_options : ['cpp_std=c++11'],
version: '2.6.6')

View File

@ -285,7 +285,7 @@ custom_target('hb-version.h',
input: 'hb-version.h.in',
output: 'hb-version.h',
command: [find_program('gen-hb-version.py'), meson.project_version(),
'@INPUT@', join_paths(meson.current_source_dir(), 'hb-version.h')])
'@INPUT@', meson.current_source_dir() / 'hb-version.h'])
ragel = find_program('ragel', required: false)
if not ragel.found()
@ -305,7 +305,7 @@ custom_target('harfbuzz.cc',
build_by_default: true,
output: 'harfbuzz.cc',
command: [find_program('gen-harfbuzzcc.py'),
join_paths(meson.source_root(), '@OUTPUT@')] +
meson.source_root() / '@OUTPUT@'] +
hb_base_sources + hb_glib_sources + hb_ft_sources +
hb_graphite2_sources + hb_uniscribe_sources + hb_gdi_sources +
hb_directwrite_sources + hb_coretext_sources)
@ -588,7 +588,7 @@ cmake_config.set('have_gobject', have_gobject ? 'true' : 'false')
configure_file(input: 'harfbuzz-config.cmake.in',
output: 'harfbuzz-config.cmake',
configuration: cmake_config,
install_dir: join_paths(get_option('libdir'), 'cmake', 'harfbuzz'))
install_dir: get_option('libdir') / 'cmake' / 'harfbuzz')
if have_gobject
gnome = import('gnome')
@ -624,7 +624,7 @@ if have_gobject
output: 'hb-gobject-enums.h',
command: [python3, files('fix_get_types.py')[0], '@INPUT@', '@OUTPUT@'],
install: true,
install_dir: join_paths(get_option('prefix'), get_option('includedir'), meson.project_name()),
install_dir: get_option('prefix') / get_option('includedir') / meson.project_name(),
)
hb_gobject_sources += [enum_c]

View File

@ -27,7 +27,7 @@ test('shape_fuzzer', find_program('run-shape-fuzzer-tests.py'),
hb_shape_fuzzer_exe,
],
depends: [hb_shape_fuzzer_exe, libharfbuzz, libharfbuzz_subset],
workdir: join_paths(meson.current_build_dir(), '..', '..'),
workdir: meson.current_build_dir() / '..' / '..',
env: env)
test('subset_fuzzer', find_program('run-subset-fuzzer-tests.py'),
@ -37,12 +37,12 @@ test('subset_fuzzer', find_program('run-subset-fuzzer-tests.py'),
# as the tests are ran concurrently let's raise acceptable time here
# ideally better to break and let meson handles them in parallel
timeout: 300,
workdir: join_paths(meson.current_build_dir(), '..', '..'),
workdir: meson.current_build_dir() / '..' / '..',
env: env)
test('draw_fuzzer', find_program('run-draw-fuzzer-tests.py'),
args: [
hb_draw_fuzzer_exe,
],
workdir: join_paths(meson.current_build_dir(), '..', '..'),
workdir: meson.current_build_dir() / '..' / '..',
env: env)

View File

@ -276,9 +276,9 @@ foreach file_name : in_house_tests
args: [
files('run-tests.py')[0],
hb_shape,
join_paths(meson.current_source_dir(), 'data/in-house/tests', file_name),
meson.current_source_dir() / 'data' / 'in-house' / 'tests' / file_name,
],
workdir: join_paths(meson.current_build_dir(), '..', '..'),
workdir: meson.current_build_dir() / '..' / '..',
)
endforeach
@ -289,9 +289,9 @@ foreach file_name : aots_tests
args: [
files('run-tests.py')[0],
hb_shape,
join_paths(meson.current_source_dir(), 'data/aots/tests', file_name),
meson.current_source_dir() / 'data' / 'aots' / 'tests' / file_name,
],
workdir: join_paths(meson.current_build_dir(), '..', '..'),
workdir: meson.current_build_dir() / '..' / '..',
)
endforeach
@ -302,8 +302,8 @@ foreach file_name : text_rendering_tests
args: [
files('run-tests.py')[0],
hb_shape,
join_paths(meson.current_source_dir(), 'data/text-rendering-tests/tests', file_name),
meson.current_source_dir() / 'data' / 'text-rendering-tests' / 'tests' / file_name,
],
workdir: join_paths(meson.current_build_dir(), '..', '..'),
workdir: meson.current_build_dir() / '..' / '..',
)
endforeach

View File

@ -33,11 +33,11 @@ foreach t : tests
test(t, run_test,
args: [
hb_subset,
join_paths(meson.current_source_dir(), 'data', 'tests', fname),
meson.current_source_dir() / 'data' / 'tests' / fname,
],
# as the tests are ran concurrently let's raise acceptable time here
# ideally better to break and let meson handles them in parallel
timeout: 500,
workdir: join_paths(meson.current_build_dir(), '..', '..'),
workdir: meson.current_build_dir() / '..' / '..',
)
endforeach