infra : Include dlog.h only when log is enabled
[platform/core/graphics/tizenvg.git] / meson.build
1 project('thorvg',
2         'cpp',
3         default_options : ['buildtype=debugoptimized', 'b_sanitize=none', 'werror=false', 'optimization=s'],
4         version : '0.3.99',
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()),
10                       '-DTEST_DIR="@0@/test/images"'.format(meson.current_source_dir()),
11                       language : 'cpp')
12
13 config_h.set_quoted('THORVG_VERSION_STRING', meson.project_version())
14
15 if get_option('engines').contains('sw') == true
16     config_h.set10('THORVG_SW_RASTER_SUPPORT', true)
17 endif
18
19 if get_option('engines').contains('gl') == true
20     config_h.set10('THORVG_GL_RASTER_SUPPORT', true)
21 endif
22
23 if get_option('loaders').contains('svg') == true
24     config_h.set10('THORVG_SVG_LOADER_SUPPORT', true)
25 endif
26
27 if get_option('loaders').contains('tvg') == true
28     config_h.set10('THORVG_TVG_LOADER_SUPPORT', true)
29 endif
30
31 if get_option('loaders').contains('png') == true
32     config_h.set10('THORVG_PNG_LOADER_SUPPORT', true)
33 endif
34
35 if get_option('loaders').contains('jpg') == true
36     config_h.set10('THORVG_JPG_LOADER_SUPPORT', true)
37 endif
38
39 if get_option('savers').contains('tvg') == true
40     config_h.set10('THORVG_TVG_SAVER_SUPPORT', true)
41 endif
42
43 if get_option('vectors').contains('avx') == true
44     config_h.set10('THORVG_AVX_VECTOR_SUPPORT', true)
45 endif
46
47 if get_option('vectors').contains('neon') == true
48     config_h.set10('THORVG_NEON_VECTOR_SUPPORT', true)
49 endif
50
51 if get_option('bindings').contains('capi') == true
52     config_h.set10('THORVG_CAPI_BINDING_SUPPORT', true)
53 endif
54
55 if get_option('log') == true
56     config_h.set10('THORVG_LOG_ENABLED', true)
57 endif
58
59 configure_file(
60     output: 'config.h',
61     configuration: config_h
62 )
63
64 headers = [include_directories('inc'), include_directories('.')]
65
66 subdir('inc')
67 subdir('src')
68
69 if get_option('tests') == true
70    subdir('test')
71 endif
72
73 summary = '''
74
75 Summary:
76     ThorVG version:        @0@
77     Build Type:            @1@
78     Prefix:                @2@
79     Raster Engine (SW):    @3@
80     Raster Engine (GL):    @4@
81     AVX SIMD Instruction:  @5@
82     Neon SIMD Instruction: @6@
83     Loader (TVG):          @7@
84     Loader (SVG):          @8@
85     Loader (PNG):          @9@
86     Loader (JPG):          @10@
87     Saver (TVG):           @11@
88     CAPI Binding:          @12@
89     Log Message:           @13@
90     Tests:                 @14@
91     Examples:              @15@
92     Tool (Svg2Tvg):        @16@
93     Tool (Svg2Png):        @17@
94
95 '''.format(
96         meson.project_version(),
97         get_option('buildtype'),
98         get_option('prefix'),
99         get_option('engines').contains('sw'),
100         get_option('engines').contains('gl'),
101         get_option('vectors').contains('avx'),
102         get_option('vectors').contains('neon'),
103         get_option('loaders').contains('tvg'),
104         get_option('loaders').contains('svg'),
105         get_option('loaders').contains('png'),
106         get_option('loaders').contains('jpg'),
107         get_option('savers').contains('tvg'),
108         get_option('bindings').contains('capi'),
109         get_option('log'),
110         get_option('tests'),
111         get_option('examples'),
112         get_option('tools').contains('svg2tvg'),
113         get_option('tools').contains('svg2png'),
114     )
115
116 message(summary)