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
|
project('libembed', ['cpp'],
default_options: ['cpp_std=c++2a', 'warning_level=3'],
)
# libstdc++ lacks std::span at the moment
add_project_arguments(['-stdlib=libc++'], language: 'cpp')
add_project_link_arguments(['-stdlib=libc++'], language : 'cpp')
dep_zstd = dependency('libzstd')
dep_gtest = dependency('gtest')
libembed = library('embed',
'lib/embed.cpp',
dependencies: [ dep_zstd ],
include_directories: '3rd-party/frozen/include/'
)
dep_libembed = declare_dependency(
link_with: libembed,
include_directories: include_directories('lib/', '3rd-party/frozen/include')
)
prog_python = import('python').find_installation('python3')
resources_h = custom_target('resources.h',
output: 'resources.h',
input: 'scripts/rcc',
command: [prog_python, '@INPUT@', '--compress=Zstd', '--dict=dictionary', '--output=@OUTPUT@', meson.current_source_dir()/'3rd-party/tabler-icons/icons/chevron-up.svg'],
)
test('libembed',
executable('embed',
sources: [ 'test/main.cpp', resources_h ],
dependencies: [ dep_gtest, dep_libembed ]
),
env: environment({ 'CONFIGFILE' : meson.current_source_dir()/'test/defaultrc.ini' }),
workdir: meson.current_source_dir()/'test'
)
|