summaryrefslogtreecommitdiffstats
path: root/meson.build
diff options
context:
space:
mode:
authorDudemanguy <random342@airmail.cc>2023-05-01 12:05:00 -0500
committerDudemanguy <random342@airmail.cc>2023-05-02 19:20:50 +0000
commita3eb16330361396311f09c952095ea6280835399 (patch)
tree4e9116a2c0a522b54b894a6ea4a0d83fae5ab00a /meson.build
parent6234a709202282d8a8bfffd0ee4f9d80561dd4b9 (diff)
downloadmpv-a3eb16330361396311f09c952095ea6280835399.tar.bz2
mpv-a3eb16330361396311f09c952095ea6280835399.tar.xz
meson: bump required version to 0.62
This lets us use meson's custom dl dependency as well as the version method when checking rst2pdf's version.
Diffstat (limited to 'meson.build')
-rw-r--r--meson.build16
1 files changed, 6 insertions, 10 deletions
diff --git a/meson.build b/meson.build
index 4aada48731..30cb219a5b 100644
--- a/meson.build
+++ b/meson.build
@@ -2,7 +2,7 @@ project('mpv',
'c',
license: ['GPL2+', 'LGPL2.1+'],
version: files('./VERSION'),
- meson_version: '>=0.60.3',
+ meson_version: '>=0.62.0',
default_options: [
'buildtype=debugoptimized',
'b_lundef=false',
@@ -327,10 +327,10 @@ endif
features += {'ta-leak-report': get_option('ta-leak-report')}
-libdl_dep = cc.find_library('dl', required: false)
-features += {'libdl': cc.has_function('dlopen', dependencies: libdl_dep, prefix: '#include <dlfcn.h>')}
+libdl = dependency('dl', required: false)
+features += {'libdl': libdl.found()}
if features['libdl']
- dependencies += libdl_dep
+ dependencies += libdl
endif
cplugins = get_option('cplugins').require(
@@ -1592,10 +1592,7 @@ endif
rst2pdf = find_program('rst2pdf', required: get_option('pdf-build'))
features += {'pdf-build': rst2pdf.found()}
if features['pdf-build']
- rst2pdf_help = run_command(
- rst2pdf, '--help',
- check: true, capture: true
- ).stdout()
+ dependency_file = rst2pdf.version().version_compare('>=0.100')
datadir = get_option('datadir')
custom_target('pdf-manpages',
input: manpage,
@@ -1603,8 +1600,7 @@ if features['pdf-build']
command: [
docutils_wrapper, rst2pdf,
'-c', '-b', '1', '--repeat-table-rows',
- rst2pdf_help.contains('--record-dependencies') ?
- ['--record-dependencies', '@DEPFILE@'] : [],
+ dependency_file ? ['--record-dependencies', '@DEPFILE@'] : [],
'@INPUT@', '-o', '@OUTPUT@'],
depfile: 'mpv.pdf.dep',
install: true,