summaryrefslogtreecommitdiff
path: root/src/lib/evas/meson.build
diff options
context:
space:
mode:
Diffstat (limited to 'src/lib/evas/meson.build')
-rw-r--r--src/lib/evas/meson.build166
1 files changed, 146 insertions, 20 deletions
diff --git a/src/lib/evas/meson.build b/src/lib/evas/meson.build
index e1165be..d220238 100644
--- a/src/lib/evas/meson.build
+++ b/src/lib/evas/meson.build
@@ -1,16 +1,53 @@
1# README 1# README
2# 2#
3# Evas build is a bit more complex.
4# the final shared library is build in src/lib/evas_goal/meson.build.
5#
6# The content of lib/evas is build as static_library as
7# are all the engines loaders and savers.
8#
9# All those stages are defining dependencies with theire source code 3# All those stages are defining dependencies with theire source code
10# as 'source :', later everything is build as libevas.so. 4# as 'source :', later everything is build as libevas.so.
11# 5#
12# For now loaders and savers are ALWAYS build statically. 6
13# 7png = dependency('libpng')
8tiff = dependency('libtiff-4', required: get_option('evas-loaders-disabler').contains('tiff') == false)
9giflib = cc.find_library('gif')
10webp = dependency('libwebp', required: get_option('evas-loaders-disabler').contains('webp') == false)
11
12evas_image_loaders_file = [
13 ['bmp', 'shared', []],
14 ['eet', 'static', [eet]],
15 ['generic', 'shared', [rt]],
16 ['gif', 'shared', [giflib]],
17 ['ico', 'shared', []],
18 ['jpeg', 'static', [jpeg]],
19 ['pmaps', 'shared', []],
20 ['png', 'static', [png]],
21 ['psd', 'shared', []],
22 ['tga', 'shared', []],
23 ['tgv', 'shared', [rg_etc, lz4]],
24 ['tiff', 'shared', [tiff]],
25 ['wbmp', 'shared', []],
26 ['webp', 'shared', [webp]],
27 ['xpm', 'shared', []]
28]
29
30evas_image_savers_file = [
31 ['eet', 'static', [eet]],
32 ['jpeg', 'static', [jpeg]],
33 ['png', 'static', [png]],
34 ['tgv', 'shared', [rg_etc, lz4]],
35 ['tiff', 'shared', [tiff]],
36 ['webp', 'shared', [webp]],
37]
38json = dependency('rlottie', required: get_option('evas-loaders-disabler').contains('json') == false)
39
40evas_vg_loaders_file = [
41 ['eet', [eet]],
42 ['json', [json]],
43 ['svg', []],
44]
45
46evas_vg_savers_file = ['eet', 'svg']
47
48evas_model_savers_file = ['eet', 'obj', 'ply']
49
50evas_model_loaders_file = ['eet', 'md2', 'obj', 'ply']
14 51
15rel_evas_modules = join_paths('..', '..', '..', 'modules', 'evas', 'engines', 'software_generic') 52rel_evas_modules = join_paths('..', '..', '..', 'modules', 'evas', 'engines', 'software_generic')
16evas_deps = [eo, eet, eina, efl, emile, ector, ecore, buildsystem, intl] 53evas_deps = [eo, eet, eina, efl, emile, ector, ecore, buildsystem, intl]
@@ -168,13 +205,8 @@ if get_option('opengl') != 'none'
168 endif 205 endif
169endif 206endif
170 207
171evas_pre = declare_dependency(
172 include_directories: evas_include_directories + [vg_common_inc_dir] + [include_directories(join_paths('..', '..', 'modules', 'evas', 'engines', 'buffer'))],
173 sources : pub_eo_file_target + priv_eo_file_target,
174 dependencies: [eina, eo, ector, emile, evas_deps, m],
175)
176
177evas_link = [ ] 208evas_link = [ ]
209evas_pub_deps = [eina, ecore, ector, emile]
178 210
179if cpu_sse3 == true or cpu_neon == true and cpu_neon_intrinsics == false 211if cpu_sse3 == true or cpu_neon == true and cpu_neon_intrinsics == false
180 evas_opt = static_library('evas_opt', 212 evas_opt = static_library('evas_opt',
@@ -189,11 +221,106 @@ if cpu_sse3 == true or cpu_neon == true and cpu_neon_intrinsics == false
189 evas_link += [ evas_opt ] 221 evas_link += [ evas_opt ]
190endif 222endif
191 223
192evas_pre_lib_dep = declare_dependency( 224foreach loader_inst : evas_image_loaders_file
193 include_directories: evas_include_directories + [vg_common_inc_dir], 225 loader = loader_inst[0]
194 sources : [evas_src, pub_eo_file_target], 226 loader_type = loader_inst[1]
195 link_with: evas_link, 227 loader_deps = loader_inst[2]
196 dependencies: [evas_deps, m, draw, valgrind, libunibreak] 228 if get_option('evas-loaders-disabler').contains(loader) == false
229 if loader_type == 'static'
230 config_h.set('BUILD_LOADER_'+loader.to_upper(), '1')
231 file = join_paths(meson.source_root(), 'src', 'modules', 'evas', 'image_loaders', loader, 'evas_image_load_'+loader+'.c')
232 config_h.set('EVAS_STATIC_BUILD_'+loader.to_upper(), '1')
233 evas_static_list += [declare_dependency(
234 sources: file,
235 dependencies: loader_deps,
236 )]
237 endif
238 else
239 message('Image loader '+loader+' disabled')
240 endif
241endforeach
242
243foreach loader_inst : evas_image_savers_file
244 loader = loader_inst[0]
245 loader_type = loader_inst[1]
246 loader_deps = loader_inst[2]
247 if get_option('evas-loaders-disabler').contains(loader) == false
248 if loader_type == 'static'
249 config_h.set('BUILD_LOADER_'+loader.to_upper(), '1')
250 file = join_paths(meson.source_root(), 'src', 'modules', 'evas', 'image_savers', loader, 'evas_image_save_'+loader+'.c')
251 config_h.set('EVAS_STATIC_BUILD_'+loader.to_upper(), '1')
252 evas_static_list += [declare_dependency(
253 sources: file,
254 dependencies: loader_deps,
255 )]
256 endif
257 else
258 message('Image saver '+loader+' disabled')
259 endif
260endforeach
261
262foreach loader_inst : evas_vg_loaders_file
263 loader = loader_inst[0]
264 loader_deps = loader_inst[1]
265
266 if (get_option('evas-loaders-disabler').contains(loader) == false)
267 file = join_paths(meson.source_root(), 'src', 'modules', 'evas', 'vg_loaders', loader, 'evas_vg_load_'+loader+'.c')
268 evas_static_list += [declare_dependency(
269 sources: file,
270 dependencies: loader_deps,
271 )]
272 config_h.set('EVAS_STATIC_BUILD_VG_'+loader.to_upper(), '1')
273 endif
274endforeach
275
276foreach loader : evas_vg_savers_file
277 if (get_option('evas-loaders-disabler').contains(loader) == false)
278 file = join_paths(meson.source_root(), 'src', 'modules', 'evas', 'vg_savers', loader, 'evas_vg_save_'+loader+'.c')
279 evas_static_list += [declare_dependency(
280 sources: file,
281 dependencies: [eo, ector, emile, freetype, eet],
282 )]
283 config_h.set('EVAS_STATIC_BUILD_VG_'+loader.to_upper(), '1')
284 endif
285endforeach
286
287foreach loader : evas_model_loaders_file
288 file = join_paths(meson.source_root(), 'src', 'modules', 'evas', 'model_loaders', loader, 'evas_model_load_'+loader+'.c')
289
290 evas_static_list += [declare_dependency(
291 sources: file,
292 )]
293endforeach
294
295foreach loader : evas_model_savers_file
296 file = join_paths(meson.source_root(), 'src', 'modules', 'evas', 'model_savers', loader, 'evas_model_save_'+loader+'.c')
297
298 evas_static_list += [declare_dependency(
299 sources: file,
300 )]
301endforeach
302
303evas_lib = library('evas',
304 include_directories: evas_include_directories + [vg_common_inc_dir],
305 sources : [evas_src, pub_eo_file_target, priv_eo_file_target],
306 dependencies: [evas_deps, m, draw, valgrind, libunibreak, evas_static_list],
307 link_with: evas_link,
308 install: true,
309 c_args : '-DPACKAGE_DATA_DIR="'+join_paths(dir_data, 'evas')+'"',
310 version : meson.project_version()
311)
312
313evas = declare_dependency(
314 link_with : [evas_lib],
315 sources: pub_eo_file_target,
316 dependencies : [m] + evas_pub_deps + evas_deps,
317 include_directories: evas_include_directories + [vg_common_inc_dir] + [include_directories(join_paths('..', '..', 'modules', 'evas', 'engines', 'buffer'))],
318)
319
320evas_bin = declare_dependency(
321 link_with : [evas_lib],
322 dependencies : [eina, ecore, ector, emile, lua],
323 include_directories : evas_include_directories
197) 324)
198 325
199if get_option('install-eo-files') 326if get_option('install-eo-files')
@@ -206,7 +333,6 @@ install_headers(evas_header_src,
206 install_dir : dir_package_include, 333 install_dir : dir_package_include,
207) 334)
208 335
209automatic_pkgfile = false
210pub_eo_files = [] 336pub_eo_files = []
211package_eo_subdirs += ['canvas', 'gesture'] 337package_eo_subdirs += ['canvas', 'gesture']
212package_header_subdirs += ['canvas', 'gesture'] 338package_header_subdirs += ['canvas', 'gesture']