forked from Samsung/rlottie
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathmeson.build
54 lines (39 loc) · 1.39 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
project('rlottie library',
'cpp',
license : 'Apache')
rlottie_lib_version = '0.0.1'
add_global_arguments('-DDEMO_DIR="@0@/example/resource/"'.format(meson.current_source_dir()), language : 'cpp')
compiler_flags = ['-Wall', '-O2', '-std=c++14', '-fvisibility=hidden']
if get_option('asan') == true
compiler_flags += ['-fsanitize=address']
add_global_link_arguments('-fsanitize=address', language: 'cpp')
endif
if get_option('msan') == true
compiler_flags += ['-fsanitize=memory']
add_global_link_arguments('-fsanitize=memory', language: 'cpp')
endif
if get_option('tsan') == true
compiler_flags += ['-fsanitize=thread']
add_global_link_arguments('-fsanitize=thread', language: 'cpp')
endif
if (build_machine.system() == 'linux')
compiler_flags += ['-pthread']
add_global_link_arguments('-pthread', language: 'cpp')
endif
add_global_arguments(compiler_flags, language: 'cpp')
inc = include_directories('inc')
subdir('inc')
subdir('src')
if get_option('example') == true
subdir('example')
endif
if get_option('test') == true
subdir('test')
endif
pkg_mod = import('pkgconfig')
pkg_mod.generate( libraries : rlottie_lib,
version : rlottie_lib_version,
name : 'librlottie',
filebase : 'rlottie',
description : 'A Library for rendering lottie files.'
)