From 6666acc7341398c2312e2f5c9abef043aea72be7 Mon Sep 17 00:00:00 2001 From: Nicolas Werner Date: Thu, 16 Dec 2021 05:14:16 +0100 Subject: [PATCH] Fix compatibility with older cmark --- meson.build | 18 ++++++++++++------ 1 file changed, 12 insertions(+), 6 deletions(-) diff --git a/meson.build b/meson.build index 7d7b08bf..fb762c63 100644 --- a/meson.build +++ b/meson.build @@ -23,14 +23,20 @@ inc = include_directories('src', 'includes', 'third_party/cpp-httplib-0.5.12') deps = [ qt5_dep, - dependency('mtxclient', static: true, version : '>=0.6.0', fallback: ['mtxclient', 'matrix_client_dep']), - dependency('blurhash'), - dependency('spdlog'), - dependency('cmark'), - dependency('lmdb'), - dependency('threads'), + dependency('mtxclient', static: true, version : '>=0.6.0', fallback: ['mtxclient', 'matrix_client_dep']), + dependency('blurhash'), + dependency('spdlog'), + dependency('lmdb'), + dependency('threads'), ] +# Older cmark versions only provide the libcmark pkgconfig name, but meson only supports multiple names since 0.60.0 +if meson.version().version_compare('>=0.60.0') + deps += dependency('cmark', 'libcmark', version: '>=0.29.0') +else + deps += dependency('cmark', version: '>=0.29.0') +endif + single_app_dep = subproject('SingleApplication-3.3.0').get_variable('singleapplication_dep') deps += [single_app_dep]