[libsecret/wip/dueno/meson-pkgconfig: 1/2] meson: Simplify libgcrypt detection
- From: Daiki Ueno <dueno src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [libsecret/wip/dueno/meson-pkgconfig: 1/2] meson: Simplify libgcrypt detection
- Date: Fri, 11 Oct 2019 12:39:07 +0000 (UTC)
commit 1b1a7d1e48803b96549d87da1c03f27f5974c4a3
Author: Daiki Ueno <dueno src gnome org>
Date: Thu Oct 10 16:24:02 2019 +0200
meson: Simplify libgcrypt detection
Meson has native support for the libgcrypt-config program if pkgconfig
file is not provided.
meson.build | 20 +++-----------------
1 file changed, 3 insertions(+), 17 deletions(-)
---
diff --git a/meson.build b/meson.build
index b796495..2d2abd9 100644
--- a/meson.build
+++ b/meson.build
@@ -44,23 +44,9 @@ glib_deps = [
dependency('gio-2.0', version: '>=' + min_glib_version),
dependency('gio-unix-2.0', version: '>=' + min_glib_version),
]
-if with_gcrypt
- min_libgcrypt_version = '1.2.2'
- gcrypt_dep = dependency('libgcrypt', version: '>=' + min_libgcrypt_version, required: false)
- if not gcrypt_dep.found()
- libgcrypt_config = find_program('libgcrypt-config')
- libgcrypt_version = run_command(libgcrypt_config, '--version').stdout().strip()
- if (libgcrypt_version.version_compare('>' + libgcrypt_version))
- error('@0@ requires at least gcrypt version @1@, but version found is @2@'
- .format(meson.project_name(), min_libgcrypt_version, libgcrypt_version))
- endif
- message('gcrypt version: @0@'.format(libgcrypt_version))
- gcrypt_dep = declare_dependency(
- link_args: run_command(libgcrypt_config, '--libs').stdout().strip().split(),
- compile_args: run_command(libgcrypt_config, '--cflags').stdout().strip().split(),
- )
- endif
-endif
+
+min_libgcrypt_version = '1.2.2'
+gcrypt_dep = dependency('libgcrypt', version: '>=1.2.2', required: with_gcrypt)
# Libraries
math = meson.get_compiler('c').find_library('m')
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]