example: just renamed the svg file.
[platform/core/graphics/tizenvg.git] / src / meson.build
1 compiler_flags = ['-DTVG_BUILD']
2
3 cc = meson.get_compiler('cpp')
4 if (cc.get_id() != 'msvc')
5     if simd_type == 'avx'
6         compiler_flags += ['-mavx']
7     endif
8     if simd_type == 'neon'
9         compiler_flags += ['-mfpu=neon']
10     endif
11     if get_option('b_sanitize') == 'none'
12         compiler_flags += ['-s', '-fno-exceptions', '-fno-rtti', '-fno-stack-protector', '-fno-math-errno',
13                            '-fno-unwind-tables' , '-fno-asynchronous-unwind-tables',
14                            '-Woverloaded-virtual', '-Wno-unused-parameter']
15     endif
16 endif
17
18
19 subdir('lib')
20 subdir('loaders')
21 subdir('savers')
22 subdir('bindings')
23
24 dlog_dep = dependency('dlog', required: false)
25 thorvg_lib_dep = [common_dep, loader_dep, saver_dep, binding_dep, dlog_dep]
26 if host_machine.system() != 'windows'
27     thread_dep = meson.get_compiler('cpp').find_library('pthread')
28     thorvg_lib_dep += [thread_dep]
29 endif
30
31 thorvg_lib = library(
32     'thorvg',
33     include_directories    : headers,
34     version                : meson.project_version(),
35     dependencies           : thorvg_lib_dep,
36     install                : true,
37     cpp_args               : compiler_flags,
38     gnu_symbol_visibility  : 'hidden',
39 )
40
41 thorvg_dep = declare_dependency(
42     include_directories: headers,
43     link_with : thorvg_lib
44 )
45
46 if (cc.get_id() == 'emscripten')
47     subdir('wasm')
48
49     executable('thorvg-wasm',
50         [],
51         include_directories : headers,
52         dependencies : [thorvg_lib_dep, thorvg_wasm_dep],
53         )
54 endif
55
56 pkg_mod = import('pkgconfig')
57
58 pkg_mod.generate(
59     libraries    : thorvg_lib,
60     version      : meson.project_version(),
61     name         : 'libthorvg',
62     filebase     : 'thorvg',
63     description  : 'A Thor library for rendering vector graphics'
64 )
65
66 subdir('bin')
67
68 if get_option('examples') == true
69     subdir('examples')
70 endif