b337bafdd36090da695e050695602976b89c0db3
[platform/core/graphics/tizenvg.git] / meson.build
1 project('thorvg',
2         'cpp',
3         default_options : ['buildtype=debug', 'werror=false', 'optimization=0'],
4         version : '0.1.0',
5         license : 'MIT')
6
7 config_h = configuration_data()
8
9 add_project_arguments('-DEXAMPLE_DIR="@0@/src/examples/images"'.format(meson.current_source_dir()), language : 'cpp')
10
11 if get_option('engines').contains('sw') == true
12     config_h.set10('THORVG_SW_RASTER_SUPPORT', true)
13 endif
14
15 if get_option('engines').contains('gl') == true
16     config_h.set10('THORVG_GL_RASTER_SUPPORT', true)
17 endif
18
19 if get_option('loaders').contains('svg') == true
20     config_h.set10('THORVG_SVG_LOADER_SUPPORT', true)
21 endif
22
23 if get_option('loaders').contains('png') == true
24     config_h.set10('THORVG_PNG_LOADER_SUPPORT', true)
25 endif
26
27 if get_option('vectors').contains('avx') == true
28     config_h.set10('THORVG_AVX_VECTOR_SUPPORT', true)
29 endif
30
31 if get_option('bindings').contains('capi') == true
32     config_h.set10('THORVG_CAPI_BINDING_SUPPORT', true)
33 endif
34
35 if get_option('log') == true
36     config_h.set10('THORVG_LOG_ENABLED', true)
37     message('Enable Log')
38 endif
39
40 configure_file(
41     output: 'config.h',
42     configuration: config_h
43 )
44
45 headers = [include_directories('inc'), include_directories('.')]
46
47 subdir('inc')
48 subdir('src')
49
50 if get_option('test') == true
51    subdir('test')
52 endif
53
54 summary = '''
55
56 Summary:
57     thorvg version :        @0@
58     Build type      :       @1@
59     Prefix          :       @2@
60     Test            :       @3@
61 '''.format(
62         meson.project_version(),
63         get_option('buildtype'),
64         get_option('prefix'),
65         get_option('test'),
66     )
67
68 message(summary)