Skip to content

Commit c7ff8e1

Browse files
committed
Meson build: Require only meson.version() >= 0.51.0
meson.version() >= 0.54.0 is necessary if sigc++ is a subproject, or if mm-common is a subproject of sigc++. Only meson.version() <= 0.53.2 is available in CI. Make it possible to build with version 0.53.2 as long as no subprojects are used.
1 parent ea94a3b commit c7ff8e1

File tree

2 files changed

+16
-4
lines changed

2 files changed

+16
-4
lines changed

docs/docs/reference/meson.build

Lines changed: 11 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -15,9 +15,17 @@ docinstall_flags = []
1515
foreach module : tag_file_modules
1616
depmod = dependency(module, required: false)
1717
if depmod.found()
18-
doxytagfile = depmod.get_variable(pkgconfig: 'doxytagfile', internal: 'doxytagfile')
19-
htmlrefpub = depmod.get_variable(pkgconfig: 'htmlrefpub', internal: 'htmlrefpub', default_value: '')
20-
htmlrefdir = depmod.get_variable(pkgconfig: 'htmlrefdir', internal: 'htmlrefdir', default_value: '')
18+
if meson.version().version_compare('>=0.54.0')
19+
doxytagfile = depmod.get_variable(pkgconfig: 'doxytagfile', internal: 'doxytagfile')
20+
htmlrefpub = depmod.get_variable(pkgconfig: 'htmlrefpub', internal: 'htmlrefpub', default_value: '')
21+
htmlrefdir = depmod.get_variable(pkgconfig: 'htmlrefdir', internal: 'htmlrefdir', default_value: '')
22+
else
23+
# TODO: Remove the possibility to build with meson.version() < 0.54.0
24+
# when >= 0.54.0 is available in GitHub's CI (continuous integration).
25+
doxytagfile = depmod.get_variable(pkgconfig: 'doxytagfile')
26+
htmlrefpub = depmod.get_variable(pkgconfig: 'htmlrefpub', default_value: '')
27+
htmlrefdir = depmod.get_variable(pkgconfig: 'htmlrefdir', default_value: '')
28+
endif
2129
if htmlrefpub == ''
2230
htmlrefpub = htmlrefdir
2331
elif htmlrefdir == ''

meson.build

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,12 @@ project('libsigc++', 'cpp',
77
'cpp_std=c++17',
88
'warning_level=0',
99
],
10-
meson_version: '>= 0.54.0', # required for dep.get_variable(internal:)
10+
meson_version: '>= 0.51.0', # required for dep.get_variable()
1111
)
12+
#TODO: Require meson_version: '>= 0.54.0' when it's available
13+
# in GitHub's CI (continuous integration).
14+
# meson_version() >= 0.54.0 is necessary if sigc++ is a subproject,
15+
# or if mm-common is a subproject of sigc++.
1216

1317
sigcxx_api_version = '3.0'
1418
sigcxx_pcname = 'sigc++-' + sigcxx_api_version

0 commit comments

Comments
 (0)