summaryrefslogtreecommitdiffstats
path: root/test cases/frameworks/24 libgcrypt/meson.build
blob: 5aadb13239e7e71b73d233547fafeca219b4f0f6 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
project('libgcrypt test', 'c')

wm = find_program('libgcrypt-config', required : false)
if not wm.found()
  error('MESON_SKIP_TEST: libgcrypt-config not installed')
endif

libgcrypt_dep = dependency('libgcrypt', version : '>= 1.0')
libgcrypt_ver = libgcrypt_dep.version()
assert(libgcrypt_ver.split('.').length() > 1, 'libgcrypt version is "@0@"'.format(libgcrypt_ver))
message('libgcrypt version is "@0@"'.format(libgcrypt_ver))
e = executable('libgcrypt_prog', 'libgcrypt_prog.c', dependencies : libgcrypt_dep)

test('libgcrypttest', e)

# Test using the method keyword:

dependency('libgcrypt', method : 'config-tool')
dependency('libgcrypt', method : 'pkg-config', required: false)

# Check we can apply a version constraint
dependency('libgcrypt', version: '>=@0@'.format(libgcrypt_dep.version()), method: 'pkg-config', required: false)
dependency('libgcrypt', version: '>=@0@'.format(libgcrypt_dep.version()), method: 'config-tool')