meson: move build definitions of software_generic to libevas
authorMarcel Hollerbach <mail@marcel-hollerbach.de>
Fri, 19 Apr 2019 18:39:22 +0000 (14:39 -0400)
committerWonki Kim <wonki_.kim@samsung.com>
Thu, 25 Apr 2019 01:11:08 +0000 (10:11 +0900)
Summary:
with this we don't have any static module anymore in the engine
directory. This means either *all* modules in the enignes directory are
static OR shared. There is no mixture anymore. This is a requirement for
the directory to be build whenever we want it to be build.
Depends on D8667

Reviewers: zmike, stefan_schmidt, cedric, vtorri

Reviewed By: zmike

Subscribers: #reviewers, #committers

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D8668

Change-Id: I973c4366b888d1d452b8b0e25340b6fc6dd5a5b5

17 files changed:
src/lib/evas/meson.build
src/lib/evas/software_generic/filters/meson.build [moved from src/modules/evas/engines/software_generic/filters/meson.build with 50% similarity]
src/lib/evas/software_generic/meson.build [new file with mode: 0644]
src/modules/evas/engines/buffer/meson.build
src/modules/evas/engines/drm/meson.build
src/modules/evas/engines/fb/meson.build
src/modules/evas/engines/gl_cocoa/meson.build
src/modules/evas/engines/gl_drm/meson.build
src/modules/evas/engines/gl_generic/meson.build
src/modules/evas/engines/gl_x11/meson.build
src/modules/evas/engines/software_ddraw/meson.build
src/modules/evas/engines/software_gdi/meson.build
src/modules/evas/engines/software_generic/meson.build [deleted file]
src/modules/evas/engines/software_x11/meson.build
src/modules/evas/engines/wayland_egl/meson.build
src/modules/evas/engines/wayland_shm/meson.build
src/modules/evas/meson.build

index d72ee86..51da1d5 100644 (file)
 # For now loaders and savers are ALWAYS build statically.
 #
 
+rel_evas_modules = join_paths('..', '..', '..', 'modules', 'evas', 'engines', 'software_generic')
 evas_deps = [eo, eet, eina, efl, emile, ector, ecore, buildsystem, intl]
 pub_eo_file_target = []
 priv_eo_files = []
-
+evas_include_directories = []
+pub_eo_files = []
 pub_evas_eo_files = []
 pub_evas_eot_files = []
 
 pub_legacy_eo_files = [
 
 ]
+evas_src = []
+
+subdir('software_generic')
 
 foreach eo_file : pub_legacy_eo_files
   pub_eo_file_target += custom_target('eolian_gen_' + eo_file,
@@ -37,15 +42,11 @@ foreach eo_file : pub_legacy_eo_files
                            '-gchd', '@INPUT@'])
 endforeach
 
-pub_eo_files = [
-
-]
-
 foreach eo_file : pub_eo_files
-  pub_eo_file_target += custom_target('eolian_gen_' + eo_file,
+  pub_eo_file_target += custom_target('eolian_gen_' + eo_file.underscorify(),
     input : eo_file,
-    output : [eo_file + '.h'],
-    depfile : eo_file + '.d',
+    output : [eo_file.underscorify() + '.h'],
+    depfile : eo_file.underscorify() + '.d',
     install : true,
     install_dir : dir_package_include,
     command : eolian_gen + [ '-I', meson.current_source_dir(), eolian_include_directories,
@@ -75,6 +76,8 @@ endforeach
 
 eolian_include_directories += ['-I', meson.current_source_dir()]
 
+evas_src += pub_eo_file_target
+
 evas_header_src = [
   'Evas.h',
   'Evas_Common.h',
@@ -92,7 +95,7 @@ evas_header_src += [
 ]
 # TIZEN_ONLY --->
 
-evas_include_directories = [
+evas_include_directories += [
   include_directories('.'),
   include_directories('common'),
   include_directories('common3d'),
@@ -102,7 +105,7 @@ evas_include_directories = [
   vg_common_inc_dir
 ]
 
-evas_src = [
+evas_src += [
    'main.c'
 ]
 
@@ -1,6 +1,6 @@
-engine_include_dir += include_directories('.')
+evas_include_directories += include_directories(join_paths('..', rel_evas_modules, 'filters'))
 
-engine_src += files([
+raw_evas_src = [
   'evas_engine_filter.h',
   'evas_filter_blend.c',
   'evas_filter_blur.c',
@@ -10,4 +10,8 @@ engine_src += files([
   'evas_filter_fill.c',
   'evas_filter_mask.c',
   'evas_filter_transform.c',
-])
\ No newline at end of file
+]
+
+foreach file : raw_evas_src
+  evas_src += files(join_paths('..', rel_evas_modules, 'filters', file))
+endforeach
diff --git a/src/lib/evas/software_generic/meson.build b/src/lib/evas/software_generic/meson.build
new file mode 100644 (file)
index 0000000..187002a
--- /dev/null
@@ -0,0 +1,36 @@
+raw_evas_src = [
+  'evas_engine.c',
+  'Evas_Engine_Software_Generic.h',
+  'Evas_Engine_Software_Shared.h',
+  'evas_native_tbm.c',
+  'evas_native_dmabuf.c',
+  'evas_ector_software_buffer.c',
+  'evas_native_common.h',
+  'evas_ector_software.h',
+]
+
+gen_src = []
+
+raw_pub_eo_files = [
+  'evas_ector_software_buffer.eo'
+]
+
+foreach eo_file : raw_pub_eo_files
+  pub_eo_file_target += custom_target('eolian_gen_' + eo_file.underscorify(),
+    input : join_paths(rel_evas_modules, eo_file),
+    output : [eo_file + '.h'],
+    depfile : eo_file + '.d',
+    install : true,
+    install_dir : dir_package_include,
+    command : eolian_gen + [ '-I', join_paths(meson.current_source_dir(), rel_evas_modules), eolian_include_directories,
+                           '-o', 'h:' + join_paths(meson.current_build_dir(), eo_file + '.h'),
+                           '-o', 'c:' + join_paths(meson.current_build_dir(), eo_file + '.c'),
+                           '-o', 'd:' + join_paths(meson.current_build_dir(), eo_file + '.d'),
+                           '-gchd', '@INPUT@'])
+endforeach
+
+foreach file : raw_evas_src
+  evas_src += files(join_paths(rel_evas_modules, file))
+endforeach
+
+subdir('filters')
index e5a2510..b574221 100644 (file)
@@ -13,7 +13,7 @@ install_headers('Evas_Engine_Buffer.h',
   install_dir : dir_package_include,
 )
 
-if get_option('evas-modules') == 'shared' and not evas_force_static.contains(engine)
+if get_option('evas-modules') == 'shared'
   shared_module(mod_full_name, engine_src,
         include_directories : config_dir + [engine_include_dir],
         dependencies : [eina, evas_pre] + engine_deps,
index 6445a56..0c2933d 100644 (file)
@@ -7,7 +7,7 @@ engine_src = files([
 
 engine_deps = [ecore_drm2, libdrm]
 
-if get_option('evas-modules') == 'shared' and not evas_force_static.contains(engine)
+if get_option('evas-modules') == 'shared'
   shared_module(mod_full_name, engine_src,
         include_directories : config_dir + [engine_include_dir],
         dependencies : [eina, evas_pre] + engine_deps,
index 2900f4a..0f80a8a 100644 (file)
@@ -9,7 +9,7 @@ engine_src = files([
 
 engine_deps = [ecore_fb]
 
-if get_option('evas-modules') == 'shared' and not evas_force_static.contains(engine)
+if get_option('evas-modules') == 'shared'
   shared_module(mod_full_name, engine_src,
         include_directories : config_dir + [engine_include_dir],
         dependencies : [eina, evas_pre] + engine_deps,
index 9900862..2e6b91c 100644 (file)
@@ -7,7 +7,7 @@ engine_src = files([
 
 engine_deps = [ecore_cocoa, gl_deps]
 
-if get_option('evas-modules') == 'shared' and not evas_force_static.contains(engine)
+if get_option('evas-modules') == 'shared'
   shared_module(mod_full_name, engine_src,
         include_directories : config_dir + [engine_include_dir],
         dependencies : [eina, evas_pre] + engine_deps,
index b85f1c0..0c80fa6 100644 (file)
@@ -7,7 +7,7 @@ engine_src = files([
 
 engine_deps = [ecore_drm2, libdrm, gl_deps, dependency('gbm')]
 
-if get_option('evas-modules') == 'shared' and not evas_force_static.contains(engine)
+if get_option('evas-modules') == 'shared'
   shared_module(mod_full_name, engine_src,
         include_directories : config_dir + [engine_include_dir],
         dependencies : [eina, evas_pre] + engine_deps,
index c802201..181075e 100644 (file)
@@ -85,10 +85,10 @@ engine_deps = [gl_deps]
 
 engine_include_dir = include_directories(join_paths('..','software_generic'), join_paths('..', 'gl_common'))
 
-if get_option('evas-modules') == 'shared' and not evas_force_static.contains(engine)
+if get_option('evas-modules') == 'shared'
   shared_module(mod_full_name, engine_src,
         include_directories : config_dir + [engine_include_dir],
-        dependencies : [eina, evas_pre] + engine_deps + [software_generic],
+        dependencies : [eina, evas_pre] + engine_deps,
         install : true,
         install_dir : mod_install_dir,
         c_args: ['-DEVAS_GL_RENDER_THREAD_COMPILE_FOR_GL_GENERIC',],
index 8e9c0a1..30c86bc 100644 (file)
@@ -9,7 +9,7 @@ engine_src += engine_src_gl_thread
 
 engine_deps = [ecore_x_deps, gl_deps]
 
-if get_option('evas-modules') == 'shared' and not evas_force_static.contains(engine)
+if get_option('evas-modules') == 'shared'
   shared_module(mod_full_name, engine_src,
         include_directories : config_dir + [engine_include_dir],
         dependencies : [eina, evas_pre] + engine_deps,
index 9d3724f..83bfca3 100644 (file)
@@ -9,7 +9,7 @@ engine_src = files([
 
 engine_deps = []
 
-if get_option('evas-modules') == 'shared' and not evas_force_static.contains(engine)
+if get_option('evas-modules') == 'shared'
   shared_module(mod_full_name, engine_src,
         include_directories : config_dir + [engine_include_dir],
         dependencies : [eina, evas_pre] + engine_deps,
index 9347ecd..ef71d76 100644 (file)
@@ -9,7 +9,7 @@ engine_src = files([
 
 engine_deps = []
 
-if get_option('evas-modules') == 'shared' and not evas_force_static.contains(engine)
+if get_option('evas-modules') == 'shared'
   shared_module(mod_full_name, engine_src,
         include_directories : config_dir + [engine_include_dir],
         dependencies : [eina, evas_pre] + engine_deps,
diff --git a/src/modules/evas/engines/software_generic/meson.build b/src/modules/evas/engines/software_generic/meson.build
deleted file mode 100644 (file)
index 4d52667..0000000
+++ /dev/null
@@ -1,45 +0,0 @@
-engine_src = files([
-  'evas_engine.c',
-  'Evas_Engine_Software_Generic.h',
-  'Evas_Engine_Software_Shared.h',
-  'evas_native_tbm.c',
-  'evas_native_dmabuf.c',
-  'evas_ector_software_buffer.c',
-  'evas_native_common.h',
-  'evas_ector_software.h',
-])
-
-gen_src = []
-
-pub_eo_files = [
-  'evas_ector_software_buffer.eo'
-]
-
-subdir('filters')
-
-foreach eo_file : pub_eo_files
-  gen_src += custom_target('eolian_gen_' + eo_file,
-    input : eo_file,
-    output : [eo_file + '.h'],
-    depfile : eo_file + '.d',
-    command : eolian_gen + [ '-I', meson.current_source_dir(), eolian_include_directories,
-                           '-o', 'h:' + join_paths(meson.current_build_dir(), eo_file + '.h'),
-                           '-o', 'c:' + join_paths(meson.current_build_dir(), eo_file + '.c'),
-                           '-o', 'd:' + join_paths(meson.current_build_dir(), eo_file + '.d'),
-                           '-gchd', '@INPUT@'])
-endforeach
-
-engine_src += gen_src
-
-engine_deps = [draw, dl]
-
-if get_option('evas-modules') == 'shared' and not evas_force_static.contains(engine)
-  shared_module(mod_full_name, engine_src,
-        include_directories : config_dir + [engine_include_dir],
-        dependencies : [eina, evas_pre] + engine_deps,
-        install : true,
-        install_dir : mod_install_dir,
-        name_suffix : sys_mod_extension
-      )
-      module_files += join_paths(mod_install_dir, 'lib'+mod_full_name + '.' + sys_mod_extension)
-endif
index 950c93e..74f1bc6 100644 (file)
@@ -28,7 +28,7 @@ config_h.set('BUILD_ENGINE_SOFTWARE_XLIB', '1')
 #it looks weird but is right, gl_deps is needed for evas_x_egl.c
 engine_deps = [x11, ecore_x, ecore_x_deps, gl_deps]
 
-if get_option('evas-modules') == 'shared' and not evas_force_static.contains(engine)
+if get_option('evas-modules') == 'shared'
   shared_module(mod_full_name, engine_src,
         include_directories : config_dir + [engine_include_dir],
         dependencies : [eina, evas_pre] + engine_deps,
index 01ae422..72ec52d 100644 (file)
@@ -10,7 +10,7 @@ engine_deps = [ecore_wl2, dependency('wayland-egl'), dependency('wayland-client'
 engine_include_dir = include_directories(join_paths('..','wayland_common'))
 
 
-if get_option('evas-modules') == 'shared' and not evas_force_static.contains(engine)
+if get_option('evas-modules') == 'shared'
   shared_module(mod_full_name, engine_src,
         include_directories : config_dir + [engine_include_dir],
         dependencies : [eina, evas_pre] + engine_deps,
index 5c1fe87..6e09109 100644 (file)
@@ -8,7 +8,7 @@ engine_deps = [ecore_wl2]
 
 engine_include_dir = include_directories(join_paths('..','wayland_common'))
 
-if get_option('evas-modules') == 'shared' and not evas_force_static.contains(engine)
+if get_option('evas-modules') == 'shared'
   shared_module(mod_full_name, engine_src,
         include_directories : config_dir + [engine_include_dir],
         dependencies : [eina, evas_pre] + engine_deps,
index 4a7d629..95e66d8 100644 (file)
@@ -1,6 +1,5 @@
 engines = [
  ['buffer', []],
- ['software_generic', []],
  ['fb', ['fb']],
  ['drm', ['drm']],
  ['software_x11', ['x11']],
@@ -28,16 +27,8 @@ if get_option('tbm') == true
 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_force_static = ['software_generic']
 evas_static_list = []
 
-#<--TIZEN_ONLY
-evas_force_static += [
-  'buffer',
-  'gl_generic',
-]
-#-->
-
 #fixed dependencies by efl
 png = dependency('libpng')
 tiff = dependency('libtiff-4')
@@ -72,32 +63,14 @@ foreach engine_conf : engines
     mod_full_name = engine
     mod_install_dir = join_paths(dir_package_modules, 'engines', engine, version_name)
 
-       subdir(join_paths('engines', engine))
+    subdir(join_paths('engines', engine))
 
-    if get_option('evas-modules') == 'static' or evas_force_static.contains(engine)
-
-    if engine == 'gl_common'
+    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,
-        c_args: ['-DEVAS_GL_RENDER_THREAD_COMPILE_FOR_GL_GENERIC',]
+#        c_args: ['-DEVAS_GL_RENDER_THREAD_COMPILE_FOR_GL_GENERIC',]
       )
-    else
-      tmp = static_library(mod_full_name, engine_src,
-        include_directories : config_dir + [engine_include_dir],
-        dependencies : [eina, evas_pre] + engine_deps,
-      )
-    endif
-
-
-      if engine == 'software_generic'
-        software_generic = declare_dependency(
-          include_directories: engine_include_dir,
-          sources : gen_src,
-          dependencies : [eina, evas_pre] + engine_deps,
-          link_with : tmp
-        )
-      endif
       evas_static_list += declare_dependency(
         include_directories: [include_directories('.')] + config_dir + [engine_include_dir],
         link_with: tmp,
@@ -118,3 +91,6 @@ foreach engine_conf : engines
     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')