examples: move tests to src/examples
[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 get_option('vectors').contains('avx')
6         compiler_flags += ['-mavx']
7         message('Enable Advanced Vector Extension')
8     endif
9     compiler_flags += ['-fno-exceptions', '-fno-rtti',
10                        '-fno-unwind-tables' , '-fno-asynchronous-unwind-tables',
11                        '-Woverloaded-virtual', '-Wno-unused-parameter']
12 endif
13
14
15 subdir('lib')
16 subdir('loaders')
17 subdir('bindings')
18
19 thread_dep = meson.get_compiler('cpp').find_library('pthread')
20 thorvg_lib_dep = [common_dep, loader_dep, binding_dep, thread_dep]
21
22 thorvg_lib = library(
23         'thorvg',
24         include_directories    : headers,
25         version                : meson.project_version(),
26         dependencies           : thorvg_lib_dep,
27         install                : true,
28         cpp_args               : compiler_flags,
29         gnu_symbol_visibility  : 'hidden',
30 )
31
32 thorvg_dep = declare_dependency(
33         include_directories: headers,
34         link_with : thorvg_lib
35 )
36
37 pkg_mod = import('pkgconfig')
38
39 pkg_mod.generate(
40         libraries    : thorvg_lib,
41         version      : meson.project_version(),
42         name         : 'libthorvg',
43         filebase     : 'thorvg',
44         description  : 'A Thor library for rendering vector graphics'
45 )
46
47 subdir('bin')
48
49 if get_option('examples') == true
50     message('Enable Examples')
51     subdir('examples')
52 endif