diff options
author | Iñigo Martínez <inigomartinez@gmail.com> | 2018-12-17 16:10:14 +0100 |
---|---|---|
committer | Iñigo Martínez <inigomartinez@gmail.com> | 2019-01-04 16:33:53 +0100 |
commit | 5bc63310a721946199c68160b5134971d5fe0fc6 (patch) | |
tree | fe27d15a5c6d0a43a6f6f612b0319fa23b276962 | |
parent | f4ee93b06cfc4d9f727f9174e40d08097a25d571 (diff) | |
download | gvfs-5bc63310a721946199c68160b5134971d5fe0fc6.tar.gz |
build: Always use dependency function for libgcrypt
meson 0.49 has gained support for `libgcrypt-config` when using the
`dependency` function[0], so there is not need to call to it from
build files.
The minimum required meson version has also been bumped to 0.49.
[0] http://mesonbuild.com/Release-notes-for-0-49-0.html#libgcrypt-dependency-now-supports-libgcryptconfig
-rw-r--r-- | meson.build | 21 |
1 files changed, 2 insertions, 19 deletions
diff --git a/meson.build b/meson.build index 7e539654..55771186 100644 --- a/meson.build +++ b/meson.build @@ -3,7 +3,7 @@ project( version: '1.39.4', license: 'LGPL2+', default_options: 'buildtype=debugoptimized', - meson_version: '>= 0.46.0', + meson_version: '>= 0.49.0', ) gvfs_name = meson.project_name() @@ -234,24 +234,7 @@ have_libxml = libxml_dep.found() # *** Check for libgcrypt *** enable_gcrypt = get_option('gcrypt') if enable_gcrypt - libgcrypt_req_version = '>= 1.2.2' - - libgcrypt_dep = dependency('libgcrypt', version: libgcrypt_req_version, required: false) - if not libgcrypt_dep.found() - libgcrypt_config = find_program('libgcrypt-config') - libgcrypt_version = run_command(libgcrypt_config, '--version').stdout().strip() - - assert(libgcrypt_version.version_compare(libgcrypt_req_version), 'gcrypt required but libgcrypt ' + libgcrypt_req_version + ' not found') - - libgcrypt_cflags = run_command(libgcrypt_config, '--cflags').stdout().strip().split() - libgcrypt_libs = run_command(libgcrypt_config, '--libs').stdout().strip().split() - - libgcrypt_dep = declare_dependency( - compile_args: libgcrypt_cflags, - link_args: libgcrypt_libs, - version: libgcrypt_version, - ) - endif + libgcrypt_dep = dependency('libgcrypt', version: '>= 1.2.2') endif config_h.set('HAVE_GCRYPT', enable_gcrypt) |