aboutsummaryrefslogtreecommitdiff
path: root/lib/urlfilter/meson.build
blob: 2591028bba0cb3a631b06116daa6d8ac263c161a (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
urlfilter_lib = static_library('urlfilter',
    ['urlfilter.h', 'matcher.h',
    'hostlist/hostlist.cpp', 'hostlist/hostlist.h',
    'adblock/adblocklist.cpp', 'adblock/adblocklist.h', 'adblock/parser.cpp', 'adblock/parser.h'],
    dependencies: dep_qt5
)

dep_urlfilter = declare_dependency(
    include_directories: include_directories('.'),
    link_with: urlfilter_lib
)

if dep_gtest.found()
    test('urlfilter: matcher',
        executable('urlfilter-matcher', dependencies: [dep_qt5, dep_gtest, dep_urlfilter], sources: ['test/matcher.cpp']),
        workdir: meson.current_source_dir() / 'test'
    )
    test('urlfilter: host list',
        executable('urlfilter-hostlist', dependencies: [dep_qt5, dep_gtest, dep_urlfilter], sources: ['test/hostlist.cpp']),
        workdir: meson.current_source_dir() / 'test'
    )
    test('urlfilter: adblock list',
        executable('urlfilter-adblocklist', dependencies: [dep_qt5, dep_gtest, dep_urlfilter], sources: ['test/adblock.cpp']),
        workdir: meson.current_source_dir() / 'test'
    )
endif