summaryrefslogtreecommitdiff
path: root/tests/lua-factory/sources/meson.build
blob: 010bc670b5348ac1a5ef359fe6c7e7fc4918ac6e (plain)
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
#
# meson.build
#
# Author: Juan A. Suarez Romero <jasuarez@igalia.com>
#
# Copyright (C) 2016 Igalia S.L. All rights reserved.

acoustid_resources = gnome.compile_resources('acoustidresources',
    'test_lua_acoustid.gresource.xml',
    c_name: '_grl_lua_acoustid')

metrolyrics_resources = gnome.compile_resources('metrolyricsresources',
    'test_lua_metrolyrics.gresource.xml',
    c_name: '_grl_lua_metrolyrics')

source_tests = [
    'test_lua_metrolyrics',
]

if chromaprint_enabled
    source_tests += [
        'test_lua_acoustid',
    ]
endif

source_common = [
    'test_lua_factory_utils.c',
    'test_lua_factory_utils.h',
]

resources = acoustid_resources + metrolyrics_resources

foreach t: source_tests
    exe = executable(t, [t + '.c'] + source_common + resources,
        install: false,
        dependencies: must_deps,
        c_args: [
            '-DCHROMAPRINT_PLUGIN_PATH="@0@/src/chromaprint/"'.format(meson.build_root()),
            '-DLUA_FACTORY_PLUGIN_PATH="@0@/src/lua-factory/"'.format(meson.build_root()),
            '-DLUA_FACTORY_PLUGIN_TEST_DATA_PATH="@0@/"'.format(meson.current_build_dir()),
            '-DLUA_FACTORY_SOURCES_DATA_PATH="@0@/data/"'.format(meson.current_source_dir()),
            '-DLUA_FACTORY_SOURCES_PATH="@0@/src/lua-factory/sources/"'.format(meson.source_root()),
        ])
    test(t, exe)
endforeach