meson: seperate the engine build file from the rest
Summary: this is required later on, where we want to build the engines undependend from image loaders etc. Depends on D8668 Reviewers: zmike, stefan_schmidt, cedric, vtorri Reviewed By: zmike Subscribers: #reviewers, #committers Tags: #efl Differential Revision: https://phab.enlightenment.org/D8669
This commit is contained in:
parent
c8c374ef48
commit
0deba6ef4c
|
@ -0,0 +1,72 @@
|
|||
engines = [
|
||||
['buffer', []],
|
||||
['fb', ['fb']],
|
||||
['drm', ['drm']],
|
||||
['software_x11', ['x11']],
|
||||
['wayland_shm', ['wl']],
|
||||
]
|
||||
|
||||
if get_option('opengl') != 'none'
|
||||
engines += [
|
||||
['gl_generic', []],
|
||||
['gl_x11', ['x11']],
|
||||
['gl_drm', ['drm']],
|
||||
['gl_cocoa', ['cocoa']],
|
||||
]
|
||||
endif
|
||||
|
||||
if get_option('opengl') == 'es-egl'
|
||||
engines += [['wayland_egl', ['wl']]]
|
||||
endif
|
||||
|
||||
|
||||
foreach engine_conf : engines
|
||||
engine = engine_conf[0]
|
||||
build = true
|
||||
if engine_conf[1].length() > 0
|
||||
build = get_option(engine_conf[1][0])
|
||||
endif
|
||||
if build
|
||||
engine_include_dir = []
|
||||
engine_src = []
|
||||
engine_deps = []
|
||||
engine_dep = declare_dependency(
|
||||
include_directories: include_directories(engine),
|
||||
)
|
||||
|
||||
var_name = 'engine_'+engine
|
||||
set_variable(var_name, engine_dep)
|
||||
|
||||
mod_full_name = engine
|
||||
mod_install_dir = join_paths(dir_package_modules, 'engines', engine, version_name)
|
||||
|
||||
subdir(engine)
|
||||
|
||||
if get_option('evas-modules') == 'static'
|
||||
tmp = static_library(mod_full_name, engine_src,
|
||||
include_directories : config_dir + [engine_include_dir],
|
||||
dependencies : [eina, evas_pre] + engine_deps,
|
||||
)
|
||||
evas_static_list += declare_dependency(
|
||||
include_directories: [include_directories('.')] + config_dir + [engine_include_dir],
|
||||
link_with: tmp,
|
||||
dependencies : [eina, evas_pre] + engine_deps,
|
||||
sources : engine_src
|
||||
)
|
||||
if engine == 'gl_generic'
|
||||
#special case, see evas_module.c
|
||||
config_h.set('EVAS_STATIC_BUILD_GL_COMMON', '1')
|
||||
else
|
||||
config_h.set('EVAS_STATIC_BUILD_'+engine.to_upper(), '1')
|
||||
endif
|
||||
else
|
||||
#nothing here shared building is handled directly on the engine configuration side
|
||||
#reason for this is that the .so files have to be placed in the correct directory in order
|
||||
# to make them discoverable by evas module code
|
||||
endif
|
||||
config_h.set('BUILD_ENGINE_'+engine.to_upper(), '1')
|
||||
endif
|
||||
endforeach
|
||||
|
||||
config_h.set('EVAS_STATIC_BUILD_SOFTWARE_GENERIC', '1')
|
||||
config_h.set('BUILD_ENGINE_SOFTWARE_GENERIC', '1')
|
|
@ -1,27 +1,3 @@
|
|||
engines = [
|
||||
['buffer', []],
|
||||
['fb', ['fb']],
|
||||
['drm', ['drm']],
|
||||
['software_x11', ['x11']],
|
||||
['wayland_shm', ['wl']],
|
||||
]
|
||||
|
||||
if get_option('opengl') != 'none'
|
||||
engines += [
|
||||
['gl_generic', []],
|
||||
['gl_x11', ['x11']],
|
||||
['gl_drm', ['drm']],
|
||||
['gl_cocoa', ['cocoa']],
|
||||
]
|
||||
endif
|
||||
|
||||
if get_option('opengl') == 'es-egl'
|
||||
engines += [['wayland_egl', ['wl']]]
|
||||
endif
|
||||
|
||||
#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 = []
|
||||
|
||||
#fixed dependencies by efl
|
||||
png = dependency('libpng')
|
||||
tiff = dependency('libtiff-4')
|
||||
|
@ -29,60 +5,13 @@ giflib = cc.find_library('gif')
|
|||
|
||||
webp = dependency('libwebp', required: get_option('evas-loaders-disabler').contains('webp') == false)
|
||||
|
||||
#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')
|
||||
subdir('vg_loaders')
|
||||
|
||||
foreach engine_conf : engines
|
||||
engine = engine_conf[0]
|
||||
build = true
|
||||
if engine_conf[1].length() > 0
|
||||
build = get_option(engine_conf[1][0])
|
||||
endif
|
||||
if build
|
||||
engine_include_dir = []
|
||||
engine_src = []
|
||||
engine_deps = []
|
||||
engine_dep = declare_dependency(
|
||||
include_directories: include_directories(join_paths('engines', engine)),
|
||||
)
|
||||
|
||||
var_name = 'engine_'+engine
|
||||
set_variable(var_name, engine_dep)
|
||||
|
||||
mod_full_name = engine
|
||||
mod_install_dir = join_paths(dir_package_modules, 'engines', engine, version_name)
|
||||
|
||||
subdir(join_paths('engines', engine))
|
||||
|
||||
if get_option('evas-modules') == 'static'
|
||||
tmp = static_library(mod_full_name, engine_src,
|
||||
include_directories : config_dir + [engine_include_dir],
|
||||
dependencies : [eina, evas_pre] + engine_deps,
|
||||
)
|
||||
evas_static_list += declare_dependency(
|
||||
include_directories: [include_directories('.')] + config_dir + [engine_include_dir],
|
||||
link_with: tmp,
|
||||
dependencies : [eina, evas_pre] + engine_deps,
|
||||
sources : engine_src
|
||||
)
|
||||
if engine == 'gl_generic'
|
||||
#special case, see evas_module.c
|
||||
config_h.set('EVAS_STATIC_BUILD_GL_COMMON', '1')
|
||||
else
|
||||
config_h.set('EVAS_STATIC_BUILD_'+engine.to_upper(), '1')
|
||||
endif
|
||||
else
|
||||
#nothing here shared building is handled directly on the engine configuration side
|
||||
#reason for this is that the .so files have to be placed in the correct directory in order
|
||||
# to make them discoverable by evas module code
|
||||
endif
|
||||
config_h.set('BUILD_ENGINE_'+engine.to_upper(), '1')
|
||||
endif
|
||||
endforeach
|
||||
|
||||
config_h.set('EVAS_STATIC_BUILD_SOFTWARE_GENERIC', '1')
|
||||
config_h.set('BUILD_ENGINE_SOFTWARE_GENERIC', '1')
|
||||
subdir('engines')
|
||||
|
|
Loading…
Reference in New Issue