aboutsummaryrefslogtreecommitdiff
path: root/src/plugin/namestore/meson.build
blob: 86eeb37c5a5aa9ea1c42a60a5153fe4a3dca1f05 (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
62
63
libgnunetpluginnamestore_sqlite_src = ['plugin_namestore_sqlite.c']

shared_module('gnunet_plugin_namestore_sqlite',
        libgnunetpluginnamestore_sqlite_src,
        dependencies: [libgnunetutil_dep,
                       libgnunetgnsrecord_dep,
                       libgnunetsq_dep,
                       sqlite_dep],
        include_directories: [incdir, configuration_inc],
        install: true,
        install_dir: get_option('libdir')/'gnunet')

configure_file(copy: true,
               input: 'test_plugin_namestore_sqlite.conf',
               output: 'test_plugin_namestore_sqlite.conf')

configure_file(input : 'namestore-0001.sql',
               output : 'namestore-0001.sql',
               configuration : cdata,
               install: true,
               install_dir: get_option('datadir')/'gnunet'/'sql')

configure_file(input : 'namestore-drop.sql',
               output : 'namestore-drop.sql',
               configuration : cdata,
               install: true,
               install_dir: get_option('datadir')/'gnunet'/'sql')

if pq_dep.found()
  shared_module('gnunet_plugin_namestore_postgres',
          ['plugin_namestore_postgres.c'],
          dependencies: [libgnunetutil_dep,
                         libgnunetgnsrecord_dep,
                         libgnunetpq_dep,
                         pq_dep],
          include_directories: [incdir, configuration_inc],
          install: true,
          install_dir: get_option('libdir')/'gnunet')
configure_file(copy: true,
               input: 'test_plugin_namestore_postgres.conf',
               output: 'test_plugin_namestore_postgres.conf')

  testpluginnamestore_pq = executable ('test_plugin_namestore_postgres',
              ['test_plugin_namestore.c'],
              dependencies: [
                libgnunetutil_dep
              ],
              include_directories: [incdir, configuration_inc],
              install: false)
  test('test_plugin_namestore_postgres', testpluginnamestore_pq, workdir: meson.current_build_dir(),
     suite: 'namestore')
endif

testpluginnamestore_sq = executable ('test_plugin_namestore_sqlite',
            ['test_plugin_namestore.c'],
            dependencies: [
              libgnunetutil_dep
            ],
            include_directories: [incdir, configuration_inc],
            install: false)
test('test_plugin_namestore_sqlite', testpluginnamestore_sq, workdir: meson.current_build_dir(),
   suite: 'namestore')