build - images loaders and saver modules need to link to evas

if your platform is picky enough it won't want to leave unresolved
symbols (which wshould be resovled at runtime from the host lib) so we
need to link these modules to evas. the problem is due to the
complicated build of some modules being static and some shared, evas
is declared with evas_goal and this has to be declared after static
modules are declared but since i was declaring static and shared at
the same time from a table this breaks. so i have to move all the
static and shared module stuff into evas_goal into 2 phases. one phase
for the static and one for the shared after evas is delcared so evas
as a target exists to link to.
devs/bu5hm4n/dead_events
Carsten Haitzler 3 years ago
parent 9371cdfef8
commit 0f3bbb51f4
  1. 2
      meson.build
  2. 143
      src/lib/evas_goal/meson.build
  3. 51
      src/modules/evas/image_loaders/meson.build
  4. 42
      src/modules/evas/image_savers/meson.build
  5. 25
      src/modules/evas/meson.build

@ -247,6 +247,8 @@ endif
ecore_evas_wayland_engine_include_dir = []
evas_static_list = []
evas_lib = ['evas' ,[], false, true, false, false, true, true, ['eina', 'efl', 'eo'], ['vg_common', 'libunibreak']]
evas_img_modules = ['evas' ,[], true, false, false, false, false, false, ['eina', 'efl', 'eo'], ['vg_common', 'libunibreak']]
evas_engines = [join_paths('evas', 'engines'),[], true, false, false, false, false, false, [], []]

@ -1,3 +1,98 @@
#fixed dependencies by efl
png = dependency('libpng')
tiff = dependency('libtiff-4', required: get_option('evas-loaders-disabler').contains('tiff') == false)
giflib = cc.find_library('gif')
webp = dependency('libwebp', required: get_option('evas-loaders-disabler').contains('webp') == false)
evas_loader_saver_mod_bmp = ['bmp', 'shared', []]
evas_loader_saver_mod_eet = ['eet', 'static', [eet]]
evas_loader_saver_mod_generic = ['generic', 'shared', [rt]]
evas_loader_saver_mod_gif = ['gif', 'shared', [giflib]]
evas_loader_saver_mod_ico = ['ico', 'shared', []]
evas_loader_saver_mod_jpeg = ['jpeg', 'static', [jpeg]]
evas_loader_saver_mod_pmaps = ['pmaps', 'shared', []]
evas_loader_saver_mod_png = ['png', 'static', [png]]
evas_loader_saver_mod_psd = ['psd', 'shared', []]
evas_loader_saver_mod_tga = ['tga', 'shared', []]
evas_loader_saver_mod_tgv = ['tgv', 'shared', [rg_etc, lz4]]
evas_loader_saver_mod_tiff = ['tiff', 'shared', [tiff]]
evas_loader_saver_mod_wbmp = ['wbmp', 'shared', []]
evas_loader_saver_mod_webp = ['webp', 'shared', [webp]]
evas_loader_saver_mod_xpm = ['xpm', 'shared', []]
evas_image_loaders_file = [
evas_loader_saver_mod_bmp,
evas_loader_saver_mod_eet,
evas_loader_saver_mod_generic,
evas_loader_saver_mod_gif,
evas_loader_saver_mod_ico,
evas_loader_saver_mod_jpeg,
evas_loader_saver_mod_pmaps,
evas_loader_saver_mod_png,
evas_loader_saver_mod_psd,
evas_loader_saver_mod_tga,
evas_loader_saver_mod_tgv,
evas_loader_saver_mod_tiff,
evas_loader_saver_mod_wbmp,
evas_loader_saver_mod_webp,
evas_loader_saver_mod_xpm
]
evas_image_savers_file = [
evas_loader_saver_mod_eet,
evas_loader_saver_mod_jpeg,
evas_loader_saver_mod_png,
evas_loader_saver_mod_tgv,
evas_loader_saver_mod_tiff,
evas_loader_saver_mod_webp
]
foreach loader_inst : evas_image_loaders_file
loader = loader_inst[0]
loader_type = loader_inst[1]
loader_deps = loader_inst[2]
if get_option('evas-loaders-disabler').contains(loader) == false
if loader_type == 'static'
config_h.set('BUILD_LOADER_'+loader.to_upper(), '1')
file = join_paths(meson.source_root(), 'src', 'modules', 'evas', 'image_loaders', loader, 'evas_image_load_'+loader+'.c')
config_h.set('EVAS_STATIC_BUILD_'+loader.to_upper(), '1')
tmp = static_library('image_loader_'+loader, file,
include_directories : config_dir,
dependencies : [evas_pre] + loader_deps
)
evas_static_list += [declare_dependency(
sources: file,
dependencies: loader_deps,
)]
endif
else
message('Image loader '+loader+' disabled')
endif
endforeach
foreach loader_inst : evas_image_savers_file
loader = loader_inst[0]
loader_type = loader_inst[1]
loader_deps = loader_inst[2]
if get_option('evas-loaders-disabler').contains(loader) == false
if loader_type == 'static'
config_h.set('BUILD_LOADER_'+loader.to_upper(), '1')
file = join_paths(meson.source_root(), 'src', 'modules', 'evas', 'image_savers', loader, 'evas_image_save_'+loader+'.c')
config_h.set('EVAS_STATIC_BUILD_'+loader.to_upper(), '1')
tmp = static_library('image_saver_'+loader, file,
include_directories : config_dir,
dependencies : [evas_pre] + loader_deps
)
evas_static_list += [declare_dependency(
sources: file,
dependencies: loader_deps,
)]
endif
else
message('Image saver '+loader+' disabled')
endif
endforeach
evas_lib = library('evas',
'empty.c',
#all the source code is coming from evas_pre_lib_dep
@ -34,3 +129,51 @@ pkgconfig.generate(evas_lib,
version : version_major + '.' + version_minor + '.' + version_micro,
libraries : [eina, ecore, ector, emile, lua],
)
foreach loader_inst : evas_image_loaders_file
loader = loader_inst[0]
loader_type = loader_inst[1]
loader_deps = loader_inst[2]
if get_option('evas-loaders-disabler').contains(loader) == false
if loader_type == 'shared'
config_h.set('BUILD_LOADER_'+loader.to_upper(), '1')
file = join_paths(meson.source_root(), 'src', 'modules', 'evas', 'image_loaders', loader, 'evas_image_load_'+loader+'.c')
evas_package_modules = join_paths(dir_lib, 'evas', 'modules')
mod_install_dir = join_paths(evas_package_modules, 'image_loaders', loader, version_name)
shared_module('shared_loader_'+loader, file,
include_directories : config_dir,
dependencies : [eina, evas] + loader_deps,
install : true,
install_dir : mod_install_dir,
name_suffix : sys_mod_extension
)
module_files += join_paths(mod_install_dir, 'libshared_loader_'+loader + '.' + sys_mod_extension)
endif
else
message('Image loader '+loader+' disabled')
endif
endforeach
foreach loader_inst : evas_image_savers_file
loader = loader_inst[0]
loader_type = loader_inst[1]
loader_deps = loader_inst[2]
if get_option('evas-loaders-disabler').contains(loader) == false
if loader_type == 'shared'
config_h.set('BUILD_LOADER_'+loader.to_upper(), '1')
file = join_paths(meson.source_root(), 'src', 'modules', 'evas', 'image_savers', loader, 'evas_image_save_'+loader+'.c')
evas_package_modules = join_paths(dir_lib, 'evas', 'modules')
mod_install_dir = join_paths(evas_package_modules, 'image_savers', loader, version_name)
shared_module('shared_saver_'+loader, file,
include_directories : config_dir,
dependencies : [eina, evas] + loader_deps,
install : true,
install_dir : mod_install_dir,
name_suffix : sys_mod_extension
)
module_files += join_paths(mod_install_dir, 'libshared_saver_'+loader + '.' + sys_mod_extension)
endif
else
message('Image saver '+loader+' disabled')
endif
endforeach

@ -1,51 +0,0 @@
evas_image_loaders_file = [
evas_loader_saver_mod_bmp,
evas_loader_saver_mod_eet,
evas_loader_saver_mod_generic,
evas_loader_saver_mod_gif,
evas_loader_saver_mod_ico,
evas_loader_saver_mod_jpeg,
evas_loader_saver_mod_pmaps,
evas_loader_saver_mod_png,
evas_loader_saver_mod_psd,
evas_loader_saver_mod_tga,
evas_loader_saver_mod_tgv,
evas_loader_saver_mod_tiff,
evas_loader_saver_mod_wbmp,
evas_loader_saver_mod_webp,
evas_loader_saver_mod_xpm
]
foreach loader_inst : evas_image_loaders_file
loader = loader_inst[0]
loader_type = loader_inst[1]
loader_deps = loader_inst[2]
if get_option('evas-loaders-disabler').contains(loader) == false
config_h.set('BUILD_LOADER_'+loader.to_upper(), '1')
file = join_paths(loader, 'evas_image_load_'+loader+'.c')
if loader_type == 'shared'
evas_package_modules = join_paths(dir_lib, 'evas', 'modules')
mod_install_dir = join_paths(evas_package_modules, 'image_loaders', loader, version_name)
shared_module(loader, file,
include_directories : config_dir,
dependencies : [evas_pre] + loader_deps,
install : true,
install_dir : mod_install_dir,
name_suffix : sys_mod_extension
)
module_files += join_paths(mod_install_dir, 'lib'+loader + '.' + sys_mod_extension)
else
config_h.set('EVAS_STATIC_BUILD_'+loader.to_upper(), '1')
tmp = static_library('image_loader_'+loader, file,
include_directories : config_dir,
dependencies : [evas_pre] + loader_deps
)
evas_static_list += [declare_dependency(
sources: file,
dependencies: loader_deps,
)]
endif
else
message('Image loader '+loader+' disabled')
endif
endforeach

@ -1,42 +0,0 @@
evas_image_savers_file = [
evas_loader_saver_mod_eet,
evas_loader_saver_mod_jpeg,
evas_loader_saver_mod_png,
evas_loader_saver_mod_tgv,
evas_loader_saver_mod_tiff,
evas_loader_saver_mod_webp
]
foreach loader_inst : evas_image_savers_file
loader = loader_inst[0]
loader_type = loader_inst[1]
loader_deps = loader_inst[2]
if get_option('evas-loaders-disabler').contains(loader) == false
config_h.set('BUILD_LOADER_'+loader.to_upper(), '1')
file = join_paths(loader, 'evas_image_save_'+loader+'.c')
if loader_type == 'shared'
evas_package_modules = join_paths(dir_lib, 'evas', 'modules')
mod_install_dir = join_paths(evas_package_modules, 'image_savers', loader, version_name)
shared_module(loader, file,
include_directories : config_dir,
dependencies : [evas_pre] + loader_deps,
install : true,
install_dir : mod_install_dir,
name_suffix : sys_mod_extension
)
module_files += join_paths(mod_install_dir, 'lib'+loader + '.' + sys_mod_extension)
else
config_h.set('EVAS_STATIC_BUILD_'+loader.to_upper(), '1')
tmp = static_library('image_saver_'+loader, file,
include_directories : config_dir,
dependencies : [evas_pre] + loader_deps
)
evas_static_list += [declare_dependency(
sources: file,
dependencies: loader_deps,
)]
endif
else
message('Image saver '+loader+' disabled')
endif
endforeach

@ -1,31 +1,6 @@
#fixed dependencies by efl
png = dependency('libpng')
tiff = dependency('libtiff-4', required: get_option('evas-loaders-disabler').contains('tiff') == false)
giflib = cc.find_library('gif')
json = dependency('rlottie', required: get_option('evas-loaders-disabler').contains('json') == false)
webp = dependency('libwebp', required: get_option('evas-loaders-disabler').contains('webp') == false)
evas_loader_saver_mod_bmp = ['bmp', 'shared', []]
evas_loader_saver_mod_eet = ['eet', 'static', [eet]]
evas_loader_saver_mod_generic = ['generic', 'shared', [rt]]
evas_loader_saver_mod_gif = ['gif', 'shared', [giflib]]
evas_loader_saver_mod_ico = ['ico', 'shared', []]
evas_loader_saver_mod_jpeg = ['jpeg', 'static', [jpeg]]
evas_loader_saver_mod_pmaps = ['pmaps', 'shared', []]
evas_loader_saver_mod_png = ['png', 'static', [png]]
evas_loader_saver_mod_psd = ['psd', 'shared', []]
evas_loader_saver_mod_tga = ['tga', 'shared', []]
evas_loader_saver_mod_tgv = ['tgv', 'shared', [rg_etc, lz4]]
evas_loader_saver_mod_tiff = ['tiff', 'shared', [tiff]]
evas_loader_saver_mod_wbmp = ['wbmp', 'shared', []]
evas_loader_saver_mod_webp = ['webp', 'shared', [webp]]
evas_loader_saver_mod_xpm = ['xpm', 'shared', []]
#there are a few modules that should NEVER be build as a module but rather be build as static lib and linked in later
evas_static_list = []
subdir('image_loaders')
subdir('image_savers')
subdir('model_savers')
subdir('model_loaders')
subdir('vg_savers')

Loading…
Cancel
Save