Skip to content

Commit 753fc5a

Browse files
ceyusaaperezdc
authored andcommitted
build: Bump to meson 0.55
There were a couple warnings appeared while running meson: WARNING: You should add the boolean check kwarg to the run_command call. It currently defaults to false, but it will default to true in future releases of meson. See also: mesonbuild/meson#9300 WARNING: Project targeting '>=0.49' but tried to use feature introduced in '0.55.0': Wrap files with patch_directory. This patch bumps meson version to 0.55 in order to remove it while simplifying the dependencies fallbacks.
1 parent b6d3088 commit 753fc5a

File tree

2 files changed

+9
-19
lines changed

2 files changed

+9
-19
lines changed

.github/workflows/build.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ jobs:
3636
- name: Install Python Packages
3737
run: |
3838
python -m pip install --upgrade pip setuptools wheel
39-
HOTDOC_BUILD_C_EXTENSION=enabled pip install hotdoc meson==0.49
39+
HOTDOC_BUILD_C_EXTENSION=enabled pip install hotdoc meson==0.55
4040
- name: Meson - Configure
4141
run: |
4242
mkdir -p _work/meson

meson.build

Lines changed: 8 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
11
project('libwpe', 'cpp', 'c',
2-
meson_version: '>=0.49',
2+
meson_version: '>=0.55',
33
default_options: [
44
'b_ndebug=if-release',
55
'c_std=c99',
66
'cpp_std=c++11',
77
],
88
license: 'BSD-2-Clause',
9-
version: run_command(join_paths('scripts', 'version.py')).stdout().strip(),
9+
version: run_command(join_paths('scripts', 'version.py'), check: true).stdout().strip(),
1010
)
1111

1212
# This refers to the API level provided. This is modified only with major,
@@ -46,21 +46,11 @@ endif
4646
dependencies = []
4747
pkg_cflags = []
4848

49-
#
50-
# Meson 0.55.0 is needed for "patch_directory" in .wrap files
51-
# and for the "allow_fallback" keyword in dependency() calls.
52-
#
53-
can_allow_fallback = meson.version().version_compare('>=0.55.0')
54-
5549
if get_option('enable-xkb')
5650
pkg_cflags += ['-DWPE_ENABLE_XKB=1']
57-
if can_allow_fallback
58-
dependencies += dependency('xkbcommon',
59-
fallback: ['libxkbcommon', 'libxkbcommon_dep'],
60-
)
61-
else
62-
dependencies += dependency('xkbcommon')
63-
endif
51+
dependencies += dependency('xkbcommon',
52+
fallback: ['libxkbcommon', 'libxkbcommon_dep'],
53+
)
6454
endif
6555

6656
cc = meson.get_compiler('c')
@@ -77,9 +67,9 @@ elif target_machine.system() != 'windows'
7767
endif
7868

7969
if not cc.has_function('dlopen')
80-
dl_dep = cc.find_library('dl', required: not can_allow_fallback)
81-
if can_allow_fallback and not dl_dep.found()
82-
dl_dep = dependency('dl', required: true,
70+
dl_dep = cc.find_library('dl', required: false)
71+
if not dl_dep.found()
72+
dl_dep = dependency('dl',
8373
allow_fallback: target_machine.system() == 'windows',
8474
)
8575
endif

0 commit comments

Comments
 (0)