aboutsummaryrefslogtreecommitdiff
path: root/src/service/rest/meson.build
blob: 1ccb89796d7a888b45b31270926cbd1e3af26fc2 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
libgnunetrest_src = ['rest.c']

gnunetservicerest_src = ['gnunet-rest-server.c',
                         'config_plugin.c',
                         'copying_plugin.c',
                         'identity_plugin.c',
                         'namestore_plugin.c',
                         'gns_plugin.c',
                         'json_reclaim.c',
                         'reclaim_plugin.c',
                         ]

if jose_dep.found()
  gnunetservicerest_src += ['oidc_helper.c', 'openid_plugin.c']
endif

configure_file(input : 'rest.conf',
               output : 'rest.conf',
               configuration : cdata,
               install: true,
               install_dir: pkgcfgdir)


if get_option('monolith')
  foreach p : libgnunetrest_src + gnunetservicerest_src
    gnunet_src += 'rest/' + p
  endforeach
endif


libgnunetrest = library('gnunetrest',
        libgnunetrest_src,
        soversion: '0',
        version: '0.0.0',
        dependencies: [libgnunetutil_dep, mhd_dep],
        include_directories: [incdir, configuration_inc],
        install: true,
        install_dir: get_option('libdir'))
pkg.generate(libgnunetrest, url: 'https://www.gnunet.org',
             description : 'Provides API for accessing the REST service')
libgnunetrest_dep = declare_dependency(link_with : libgnunetrest)

executable ('gnunet-rest-server',
            gnunetservicerest_src,
            dependencies: [libgnunetrest_dep,
                           libgnunetutil_dep,
                           libgnunetidentity_dep,
                           libgnunetgns_dep,
                           libgnunetreclaim_dep,
                           libgnunetnamestore_dep,
                           libgnunetjson_dep,
                           libgnunetgnsrecord_dep,
                           libgnunetgnsrecordjson_dep,
                           json_dep,
                           jose_dep,
                           gcrypt_dep,
                           mhd_dep],
            include_directories: [incdir, configuration_inc],
            install: true,
            install_dir: get_option('libdir') / 'gnunet' / 'libexec')