-
Notifications
You must be signed in to change notification settings - Fork 1
/
meson.build
60 lines (53 loc) · 1.35 KB
/
meson.build
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
project(
'purple-impp',
'cpp',
version: '0.1.0',
meson_version: '>=0.53.0',
default_options: [
'cpp_std=c++17',
'b_ndebug=if-release',
'warning_level=2',
],
)
SOURCES = [
'main.cpp',
'show.cpp',
'serialize.cpp',
'utils.cpp',
'comm.cpp'
]
cxx = meson.get_compiler('cpp')
PURPLE = dependency('purple', version: '>=2.0.0', include_type: 'system')
ZLIB = dependency('zlib')
LIBDL = cxx.find_library('dl')
LIBSSL = cxx.find_library('ssl')
GLOBAL_DEPS = [PURPLE, ZLIB, LIBDL, LIBSSL]
CXX_FLAGS = ['-Wno-unused-parameter', '-Wsign-conversion', '-Wswitch-default', '-Wswitch-enum',
get_option('buildtype') == 'debug'? ['-O0', '-g3', '-D_GLIBCXX_DEBUG'] : []]
add_project_arguments(
'-DPREFIX="@0@"'.format(get_option('prefix')),
'-DLIBDIR="@0@"'.format(get_option('libdir')),
'-DPLUGIN_VERSION="@0@"'.format(meson.project_version()),
CXX_FLAGS,
language : 'cpp'
)
shared_library(
meson.project_name(),
SOURCES,
dependencies: GLOBAL_DEPS,
install: true,
install_dir: PURPLE.get_pkgconfig_variable('plugindir'),
)
shared_library(
'trillian_preload',
SOURCES + ['trillian_preload.cpp'],
dependencies: GLOBAL_DEPS,
install: false,
)
executable(
'debug_app',
SOURCES + ['debug.cpp'],
dependencies: GLOBAL_DEPS,
install: false,
override_options: ['b_sanitize=address,undefined'],
)