meson.build (2531B)
1 # This build file is in the public domain 2 exchange_configs = ['currencies.conf', 'merchant-paths.conf'] 3 4 5 foreach c : exchange_configs 6 configure_file( 7 input: c, 8 output: c, 9 configuration: cdata, 10 install: true, 11 install_dir: pkgcfgdir, 12 ) 13 endforeach 14 15 16 libtalermerchantutil_SOURCES = [ 17 'amount_quantity.c', 18 'contract_parse.c', 19 'contract_serialize.c', 20 'json.c', 21 'mfa.c', 22 'os_installation.c', 23 'template_parse.c', 24 'value_kinds.c', 25 'validators.c', 26 ] 27 28 libtalermerchantutil = library( 29 'talermerchantutil', 30 libtalermerchantutil_SOURCES, 31 soversion: solibversions['libtalermerchantutil']['soversion'], 32 version: solibversions['libtalermerchantutil']['soversion'], 33 install_rpath: rpath_option, 34 dependencies: [ 35 gnunetutil_dep, 36 gnunetjson_dep, 37 talerkyclogic_dep, 38 talerutil_dep, 39 talerjson_dep, 40 json_dep, 41 ], 42 include_directories: [incdir, configuration_inc], 43 install: true, 44 install_dir: get_option('libdir'), 45 ) 46 47 libtalermerchantutil_dep = declare_dependency(link_with: libtalermerchantutil) 48 pkg.generate( 49 libtalermerchantutil, 50 url: 'https://taler.net', 51 description: 'GNU Taler merchant utilities library', 52 ) 53 54 executable( 55 'taler-merchant-config', 56 ['taler-merchant-config.c'], 57 dependencies: [libtalermerchantutil_dep, gnunetutil_dep], 58 include_directories: [incdir, configuration_inc], 59 install: true, 60 ) 61 62 talermerchantutil_tests = ['test_contract', 'test_validators'] 63 64 talermerchantutil_tests_installcheck = [] 65 66 foreach t : talermerchantutil_tests 67 68 test_tmp = executable( 69 t, 70 ['@0@.c'.format(t)], 71 dependencies: [gnunetutil_dep, libtalermerchantutil_dep, json_dep], 72 include_directories: [incdir, configuration_inc], 73 build_by_default: false, 74 install: false, 75 ) 76 test( 77 t, 78 test_tmp, 79 workdir: meson.current_build_dir(), 80 suite: ['util'], 81 is_parallel: false, 82 ) 83 endforeach 84 85 foreach t : talermerchantutil_tests_installcheck 86 87 test_tmp = executable( 88 t, 89 ['@0@.c'.format(t)], 90 dependencies: [gnunetutil_dep, libtalermerchantutil_dep, json_dep], 91 include_directories: [incdir, configuration_inc], 92 build_by_default: false, 93 install: false, 94 ) 95 test( 96 t, 97 test_tmp, 98 workdir: meson.current_build_dir(), 99 suite: ['util', 'installcheck'], 100 is_parallel: false, 101 ) 102 103 104 endforeach