summaryrefslogtreecommitdiff
path: root/meson.build
diff options
context:
space:
mode:
authorKjell Ahlstedt <kjellahlstedt@gmail.com>2019-05-31 11:05:06 +0200
committerKjell Ahlstedt <kjellahlstedt@gmail.com>2019-05-31 11:05:06 +0200
commitcca2cf9588e276284fd03711ab5d7eaf4ee9e6cc (patch)
tree02c29f9651f7160f56048c15b460615d562d10a4 /meson.build
parent84a35aa0caddf31849bf70d1d561d33eed4b81ea (diff)
downloadmm-common-cca2cf9588e276284fd03711ab5d7eaf4ee9e6cc.tar.gz
meson.build: Don't require curl or wget when use-network=false
None of those commands is used when network access is disabled.
Diffstat (limited to 'meson.build')
-rw-r--r--meson.build14
1 files changed, 9 insertions, 5 deletions
diff --git a/meson.build b/meson.build
index 17fbf43..085405f 100644
--- a/meson.build
+++ b/meson.build
@@ -226,9 +226,14 @@ install_data('README', install_dir: mm_common_docdir)
# Either curl or wget is required for downloading libstdc++.tag,
# used by Doxygen.
-curl = find_program('curl', required: false)
-if not curl.found()
- wget = find_program('wget', required: true)
+download_cmd = 'none'
+if get_option('use-network')
+ curl = find_program('curl', required: false)
+ download_cmd = 'curl'
+ if not curl.found()
+ wget = find_program('wget', required: true)
+ download_cmd = 'wget'
+ endif
endif
# Download libstdc++.tag if it does not exist or if it's out of date.
@@ -236,8 +241,7 @@ custom_target('libstdc++.tag',
output: 'libstdc++.tag',
command: [
files(join_paths('util', 'meson_aux', 'libstdcxx-tag.sh')),
- '@0@'.format(get_option('use-network')), # true or false
- curl.found() ? 'curl' : 'wget',
+ download_cmd,
join_paths(meson.current_source_dir(), 'doctags'),
'@OUTPUT@',
],