-
-
Notifications
You must be signed in to change notification settings - Fork 129
/
meson.build
60 lines (52 loc) · 1.51 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('lunasvg', 'cpp',
version: '3.1.0',
license: 'MIT',
meson_version: '>=0.59.0',
default_options: ['cpp_std=c++17']
)
plutovg_dep = dependency('plutovg',
required: true,
version: '>=0.0.4',
fallback: ['plutovg', 'plutovg_dep']
)
lunasvg_sources = [
'source/lunasvg.cpp',
'source/graphics.cpp',
'source/svgelement.cpp',
'source/svggeometryelement.cpp',
'source/svgpaintelement.cpp',
'source/svgparser.cpp',
'source/svgproperty.cpp',
'source/svglayoutstate.cpp',
'source/svgrenderstate.cpp',
'source/svgtextelement.cpp'
]
lunasvg_compile_args = []
if get_option('default_library') == 'static'
lunasvg_compile_args += ['-DLUNASVG_BUILD_STATIC']
endif
lunasvg_lib = library('lunasvg', lunasvg_sources,
include_directories: include_directories('include', 'source'),
dependencies: plutovg_dep,
version: meson.project_version(),
cpp_args: ['-DLUNASVG_BUILD'] + lunasvg_compile_args,
gnu_symbol_visibility: 'hidden',
install: true
)
lunasvg_dep = declare_dependency(
link_with: lunasvg_lib,
include_directories: include_directories('include'),
compile_args: lunasvg_compile_args
)
meson.override_dependency('lunasvg', lunasvg_dep)
install_headers('include/lunasvg.h', subdir: 'lunasvg')
if not get_option('examples').disabled()
subdir('examples')
endif
pkgmod = import('pkgconfig')
pkgmod.generate(lunasvg_lib,
name: 'LunaSVG',
description: 'SVG rendering library',
filebase: 'lunasvg',
subdirs: 'lunasvg'
)