-
Notifications
You must be signed in to change notification settings - Fork 265
Expand file tree
/
Copy pathmeson.build
More file actions
57 lines (45 loc) · 1.83 KB
/
meson.build
File metadata and controls
57 lines (45 loc) · 1.83 KB
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
compiler_flags = ['-DRLOTTIE_BUILD']
cc = meson.get_compiler('cpp')
if (cc.get_id() != 'msvc')
compiler_flags += ['-fno-exceptions', '-fno-rtti',
'-fno-unwind-tables' , '-fno-asynchronous-unwind-tables',
'-Woverloaded-virtual', '-Wno-unused-parameter']
endif
linker_flags = []
if (host_machine.system() not in ['darwin', 'windows'])
linker_flags += ['-Wl,--version-script=@0@/../rlottie.expmap'.format(meson.current_source_dir())]
endif
subdir('vector')
subdir('lottie')
subdir('binding')
rlottie_lib_dep = [ vector_dep, zip_dep, lottie_dep, binding_dep]
if get_option('thread') == true
rlottie_lib_dep += dependency('threads')
endif
rlottie_lib = library('rlottie',
include_directories : inc,
version : meson.project_version(),
dependencies : rlottie_lib_dep,
install : true,
cpp_args : compiler_flags,
link_args : linker_flags,
gnu_symbol_visibility : 'hidden',
)
# Make rlottie library usable as a Meson subproject.
rlottie_dep = declare_dependency(
include_directories: inc,
link_with : rlottie_lib)
if (cc.get_id() == 'emscripten')
subdir('wasm')
executable('rlottie-wasm',
[],
dependencies : [rlottie_dep, rlottie_wasm_dep],
)
endif
pkg_mod = import('pkgconfig')
pkg_mod.generate( libraries : rlottie_lib,
version : meson.project_version(),
name : 'librlottie',
filebase : 'rlottie',
description : 'A Library for rendering lottie files.'
)