meson.build (1725B)
1 # This meson.build is in the public domain 2 3 libmustach = static_library( 4 'mustach', 5 ['mustach.c', 'mustach-wrap.c', 'mustach-jansson.c'], 6 install: false, 7 ) 8 9 libmustach_dep = declare_dependency(link_with: libmustach) 10 11 executable( 12 'taler-mustach-tool', 13 ['mustach-tool.c'], 14 dependencies: [libmustach_dep, json_dep], 15 include_directories: [incdir, configuration_inc], 16 install: false, 17 c_args: [ 18 '-DTOOL=MUSTACH_TOOL_JANSSON', 19 '-DMUSTACH_SAFE=1', 20 '-DMUSTACH_LOAD_TEMPLATE=0', 21 ], 22 ) 23 24 libtalertemplating = library( 25 'talertemplating', 26 ['mustach.c', 'mustach-wrap.c', 'mustach-jansson.c', 'templating_api.c'], 27 soversion: solibversions['libtalertemplating']['soversion'], 28 version: solibversions['libtalertemplating']['soversion'], 29 dependencies: [ 30 libtalermhd_dep, 31 libtalerutil_dep, 32 mhd_dep, 33 gnunetjson_dep, 34 gnunetutil_dep, 35 json_dep, 36 ], 37 include_directories: [incdir, configuration_inc], 38 c_args: ['-DMUSTACH_SAFE=1', '-DMUSTACH_LOAD_TEMPLATE=0'], 39 install: true, 40 install_dir: get_option('libdir'), 41 ) 42 43 libtalertemplating_dep = declare_dependency(link_with: libtalertemplating) 44 pkg.generate( 45 libtalertemplating, 46 url: 'https://taler.net', 47 description: 'GNU Taler templating library', 48 ) 49 50 51 test_mustach_jansson = executable( 52 'test_mustach_jansson', 53 ['test_mustach_jansson.c'], 54 dependencies: [gnunetutil_dep, json_dep, libmustach_dep], 55 include_directories: [incdir, configuration_inc], 56 build_by_default: false, 57 install: false, 58 ) 59 60 test( 61 'test_mustach_jansson', 62 test_mustach_jansson, 63 workdir: meson.current_build_dir(), 64 suite: ['templating'], 65 )