c32a993698423d0f8fd7e3f4f3b30c3a433bc949
[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 subdir('bin')
33
34 thorvg_dep = declare_dependency(
35         include_directories: headers,
36         link_with : thorvg_lib
37 )
38
39 pkg_mod = import('pkgconfig')
40
41 pkg_mod.generate(
42         libraries    : thorvg_lib,
43         version      : meson.project_version(),
44         name         : 'libthorvg',
45         filebase     : 'thorvg',
46         description  : 'A Thor library for rendering vector graphics'
47 )