meson: modify meson definitions for gl_generic module 03/204103/3
authorWonki Kim <wonki_.kim@samsung.com>
Wed, 17 Apr 2019 10:27:30 +0000 (19:27 +0900)
committerwonki kim <wonki_.kim@samsung.com>
Mon, 22 Apr 2019 01:54:16 +0000 (01:54 +0000)
in tizen environment, gl_generic module can't be dynamically loadded,
because some symbols are not linked.

so this patch modify meson definitions to build gl_generic
as static linked library . it's workaround.

and also there are some sources that exist on tizen only. this patch appends them.

@tizen_only

Change-Id: I50a5ee74a684a93a102698cdb276e03e0b1d8134

meson.build
src/modules/evas/engines/gl_common/meson.build
src/modules/evas/engines/gl_generic/meson.build
src/modules/evas/engines/gl_tbm/meson.build
src/modules/evas/engines/gl_x11/meson.build
src/modules/evas/engines/wayland_egl/meson.build
src/modules/evas/meson.build

index d140223..4cb1ff1 100644 (file)
@@ -93,7 +93,6 @@ endforeach
 add_global_arguments(dev_cflags, language: 'c')
 add_global_arguments(dev_cflags, language: 'cpp')
 
-
 foreach lang : ['c', 'objc', 'cpp']
   add_global_arguments('-DHAVE_CONFIG_H=1', language: lang)
   add_global_arguments('-D_GNU_SOURCE=1', language: lang)
index 0242012..3626dfc 100644 (file)
@@ -31,6 +31,19 @@ engine_src = files([
   #join_paths('shader','evas_gl_shaders.x'),
 ])
 
+engine_src_gl_thread = files([
+  'evas_gl_thread.h',
+  'evas_gl_thread.c',
+  'evas_gl_thread_egl.h',
+  'evas_gl_thread_egl.c',
+  'evas_gl_thread_glx.h',
+  'evas_gl_thread_glx.c',
+  'evas_gl_thread_gl.h',
+  'evas_gl_thread_gl.c',
+])
+
+engine_src += engine_src_gl_thread
+
 engine_deps = [gl_deps]
 
 if get_option('evas-modules') == 'shared' and not evas_force_static.contains(engine)
index c9957d4..1108860 100644 (file)
@@ -32,7 +32,7 @@ foreach eo_file : pub_eo_files
                            '-gchd', '@INPUT@'])
 endforeach
 
-engine_deps = [gl_common]
+engine_deps = [gl_deps, gl_common]
 
 engine_include_dir = include_directories(join_paths('..','software_generic'))
 
@@ -42,6 +42,7 @@ if get_option('evas-modules') == 'shared' and not evas_force_static.contains(eng
         dependencies : [eina, evas_pre] + engine_deps + [software_generic],
         install : true,
         install_dir : mod_install_dir,
+        c_args: ['-DEVAS_GL_RENDER_THREAD_COMPILE_FOR_GL_GENERIC',],
         name_suffix : sys_mod_extension
       )
       module_files += join_paths(mod_install_dir, 'lib'+mod_full_name + '.' + sys_mod_extension)
index 6b2d54b..9f31fa0 100644 (file)
@@ -8,7 +8,7 @@ engine_header = [
     'Evas_Engine_GL_Tbm.h'
 ]
 
-engine_deps = [gl_deps, libtbm]
+engine_deps = [gl_deps, gl_common, libtbm]
 engine_include_dir = include_directories(join_paths('..','software_generic'))
 message('WKWK2 gl_tbm build')
 if get_option('evas-modules') == 'shared' and not evas_force_static.contains(engine)
index 910c72a..8e9c0a1 100644 (file)
@@ -5,6 +5,8 @@ engine_src = files([
   'evas_x_main.c',
 ])
 
+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)
index 7dc76ca..01ae422 100644 (file)
@@ -3,8 +3,9 @@ engine_src = files([
   'evas_engine.h',
   'evas_wl_main.c'
 ])
+engine_src += engine_src_gl_thread
 
-engine_deps = [ecore_wl2, dependency('wayland-egl'), gl_deps]
+engine_deps = [ecore_wl2, dependency('wayland-egl'), dependency('wayland-client'), dependency('wayland-egl-tizen'), gl_deps, gl_common]
 
 engine_include_dir = include_directories(join_paths('..','wayland_common'))
 
index 132353e..cb7020d 100644 (file)
@@ -29,9 +29,16 @@ 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', 'gl_common', 'buffer']
+evas_force_static = ['software_generic', 'gl_common']
 evas_static_list = []
 
+#<--TIZEN_ONLY
+evas_force_static += [
+  'buffer',
+  'gl_generic',
+]
+#-->
+
 #fixed dependencies by efl
 png = dependency('libpng')
 tiff = dependency('libtiff-4')
@@ -69,10 +76,20 @@ foreach engine_conf : engines
        subdir(join_paths('engines', engine))
 
     if get_option('evas-modules') == 'static' or evas_force_static.contains(engine)
+
+    if engine == 'gl_common'
+      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',]
+      )
+    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(