| 1 |
libgkm_ssh_store_sources = files( |
| 2 |
'gkm-ssh-module.c', |
| 3 |
'gkm-ssh-openssh.c', |
| 4 |
'gkm-ssh-private-key.c', |
| 5 |
'gkm-ssh-public-key.c', |
| 6 |
) |
| 7 |
|
| 8 |
libgkm_ssh_store_deps = [ |
| 9 |
glib_dep, |
| 10 |
gobject_dep, |
| 11 |
libgcrypt_dep, |
| 12 |
gmodule_dep, |
| 13 |
|
| 14 |
libegg_dep, |
| 15 |
libgkm_dep, |
| 16 |
] |
| 17 |
|
| 18 |
# The ssh-store component code |
| 19 |
libgkm_ssh_store_static = static_library('gkm-ssh-store', |
| 20 |
libgkm_ssh_store_sources, |
| 21 |
name_prefix: '', |
| 22 |
dependencies: libgkm_ssh_store_deps, |
| 23 |
include_directories: config_h_inc, |
| 24 |
) |
| 25 |
|
| 26 |
libgkm_ssh_store_dep = declare_dependency( |
| 27 |
link_with: libgkm_ssh_store_static, |
| 28 |
) |
| 29 |
|
| 30 |
# The ssh-store standalone module |
| 31 |
libgkm_ssh_store_module = shared_library('gkm-ssh-store-standalone', |
| 32 |
[ libgkm_ssh_store_sources, 'gkm-ssh-standalone.c' ], |
| 33 |
name_prefix: '', |
| 34 |
dependencies: libgkm_ssh_store_deps, |
| 35 |
link_args: pkcs11_module_linkflags, |
| 36 |
link_depends: pkcs11_module_symbolmap, |
| 37 |
include_directories: config_h_inc, |
| 38 |
install: true, |
| 39 |
install_dir: gkr_pkglibdir, |
| 40 |
) |
| 41 |
|
| 42 |
# Tests |
| 43 |
libgkm_ssh_store_tests = [ |
| 44 |
{ |
| 45 |
'name': 'ssh-openssh', |
| 46 |
'needs-mock': false, |
| 47 |
}, |
| 48 |
{ |
| 49 |
'name': 'private-key', |
| 50 |
'needs-mock': true, |
| 51 |
}, |
| 52 |
] |
| 53 |
|
| 54 |
libgkm_ssh_store_tests_deps = [ |
| 55 |
gck_dep, |
| 56 |
gcr_base_dep, |
| 57 |
|
| 58 |
libgkm_ssh_store_deps, |
| 59 |
libgkm_ssh_store_dep, |
| 60 |
] |
| 61 |
|
| 62 |
libgkm_ssh_store_tests_cflags = [ |
| 63 |
'-DSRCDIR="@0@"'.format(source_root), |
| 64 |
] |
| 65 |
|
| 66 |
foreach _test : libgkm_ssh_store_tests |
| 67 |
test_name = _test['name'] |
| 68 |
|
| 69 |
test_sources = [ f'test-@[email protected]' ] |
| 70 |
if _test['needs-mock'] |
| 71 |
test_sources += 'mock-ssh-module.c' |
| 72 |
endif |
| 73 |
|
| 74 |
test_bin = executable(test_name, |
| 75 |
test_sources, |
| 76 |
dependencies: libgkm_ssh_store_tests_deps, |
| 77 |
c_args: libgkm_ssh_store_tests_cflags, |
| 78 |
include_directories: config_h_inc, |
| 79 |
) |
| 80 |
|
| 81 |
test(test_name, test_bin, |
| 82 |
suite: 'gkm::ssh-store', |
| 83 |
) |
| 84 |
endforeach |