GPGME does not support pkg-config so we need config-tool support if we do not want projects like Almanah and Seahorse to parse the values manually.pull/5228/head
parent
d6be7822a0
commit
e8a688428d
7 changed files with 71 additions and 2 deletions
@ -0,0 +1,3 @@ |
||||
## gpgme dependency now supports gpgme-config |
||||
|
||||
Previously, we could only detect GPGME with custom invocations of `gpgme-config`. Now we added support to Meson allowing us to use `dependency('gpgme')` instead. |
@ -0,0 +1,8 @@ |
||||
#include <gpgme.h> |
||||
|
||||
int |
||||
main() |
||||
{ |
||||
printf("gpgme-v%s", gpgme_check_version(NULL)); |
||||
return 0; |
||||
} |
@ -0,0 +1,21 @@ |
||||
project('gpgme test', 'c') |
||||
|
||||
wm = find_program('gpgme-config', required: false) |
||||
if not wm.found() |
||||
error('MESON_SKIP_TEST: gpgme-config not installed') |
||||
endif |
||||
|
||||
gpgme_dep = dependency('gpgme', version: '>= 1.0') |
||||
gpgme_ver = gpgme_dep.version() |
||||
assert(gpgme_ver.split('.').length() > 1, 'gpgme version is "@0@"'.format(gpgme_ver)) |
||||
message('gpgme version is "@0@"'.format(gpgme_ver)) |
||||
e = executable('gpgme_prog', 'gpgme_prog.c', dependencies: gpgme_dep) |
||||
|
||||
test('gpgmetest', e) |
||||
|
||||
# Test using the method keyword: |
||||
|
||||
dependency('gpgme', method: 'config-tool') |
||||
|
||||
# Check we can apply a version constraint |
||||
dependency('gpgme', version: '>=@0@'.format(gpgme_dep.version()), method: 'config-tool') |
Loading…
Reference in new issue