22# Copyright 2013 The Flutter Authors. All rights reserved.
33# Use of this source code is governed by a BSD-style license that can be
44# found in the LICENSE file.
5+ import (" //flutter/shell/platform/tizen/config.gni" )
56
6- _public_headers = [ " public/flutter_tizen.h" ]
7+ group (" tizen" ) {
8+ deps = [ " :flutter_tizen_library" ]
9+ }
10+
11+ shared_library (" flutter_tizen_library" ) {
12+ output_name = " flutter_tizen"
13+
14+ ldflags = [ " -Wl,-rpath,\$ ORIGIN" ]
15+
16+ deps = [ " :flutter_tizen" ]
717
8- # Any files that are built by clients (client_wrapper code, library headers for
9- # implementations using this shared code, etc.) include the public headers
10- # assuming they are in the include path. This configuration should be added to
11- # any such code that is also built by GN to make the includes work.
12- config (" relative_flutter_tizen_headers" ) {
13- include_dirs = [ " public" ]
18+ public_configs = [ " //flutter:config" ]
1419}
1520
16- # The headers are a separate source set since the client wrapper is allowed
17- # to depend on the public headers, but none of the rest of the code.
1821source_set (" flutter_tizen_headers" ) {
19- public = _public_headers
22+ public = [
23+ " public/flutter_platform_view.h" ,
24+ " public/flutter_texture_registrar.h" ,
25+ " public/flutter_tizen.h" ,
26+ ]
2027
2128 public_deps =
2229 [ " //flutter/shell/platform/common/cpp:common_cpp_library_headers" ]
@@ -43,8 +50,7 @@ source_set("flutter_tizen") {
4350 " key_event_handler.cc" ,
4451 " tizen_embedder_engine.cc" ,
4552 " tizen_event_loop.cc" ,
46- " tizen_surface.cc" ,
47- " tizen_surface_gl.cc" ,
53+ " tizen_renderer.cc" ,
4854 " tizen_vsync_waiter.cc" ,
4955 " touch_event_handler.cc" ,
5056 ]
@@ -57,30 +63,33 @@ source_set("flutter_tizen") {
5763 " //flutter/shell/platform/common/cpp:common_cpp" ,
5864 " //flutter/shell/platform/common/cpp:common_cpp_input" ,
5965 " //flutter/shell/platform/common/cpp/client_wrapper:client_wrapper" ,
60- " //flutter/shell/platform/embedder:embedder_as_internal_library " ,
66+ " //flutter/shell/platform/embedder:flutter_engine " ,
6167 " //third_party/rapidjson" ,
6268 ]
6369
6470 include_dirs = [
65- " //third_party/tizen_tools/sysroot/$target_cpu /usr/include" ,
66- " //third_party/tizen_tools/sysroot/$target_cpu /usr/include/base" ,
67- " //third_party/tizen_tools/sysroot/$target_cpu /usr/include/dlog" ,
68- " //third_party/tizen_tools/sysroot/$target_cpu /usr/include/ecore-1" ,
69- " //third_party/tizen_tools/sysroot/$target_cpu /usr/include/ecore-evas-1" ,
70- " //third_party/tizen_tools/sysroot/$target_cpu /usr/include/ecore-imf-1" ,
71- " //third_party/tizen_tools/sysroot/$target_cpu /usr/include/ecore-imf-evas-1" ,
72- " //third_party/tizen_tools/sysroot/$target_cpu /usr/include/ecore-input-1" ,
73- " //third_party/tizen_tools/sysroot/$target_cpu /usr/include/ecore-wl2-1" ,
74- " //third_party/tizen_tools/sysroot/$target_cpu /usr/include/efl-1" ,
75- " //third_party/tizen_tools/sysroot/$target_cpu /usr/include/eina-1" ,
76- " //third_party/tizen_tools/sysroot/$target_cpu /usr/include/eina-1/eina" ,
77- " //third_party/tizen_tools/sysroot/$target_cpu /usr/include/emile-1" ,
78- " //third_party/tizen_tools/sysroot/$target_cpu /usr/include/eo-1" ,
79- " //third_party/tizen_tools/sysroot/$target_cpu /usr/include/evas-1" ,
80- " //third_party/tizen_tools/sysroot/$target_cpu /usr/include/system" ,
71+ " $custom_sysroot /usr/include" ,
72+ " $custom_sysroot /usr/include/appfw" ,
73+ " $custom_sysroot /usr/include/base" ,
74+ " $custom_sysroot /usr/include/dlog" ,
75+ " $custom_sysroot /usr/include/ecore-1" ,
76+ " $custom_sysroot /usr/include/ecore-evas-1" ,
77+ " $custom_sysroot /usr/include/ecore-imf-1" ,
78+ " $custom_sysroot /usr/include/ecore-imf-evas-1" ,
79+ " $custom_sysroot /usr/include/ecore-input-1" ,
80+ " $custom_sysroot /usr/include/ecore-wayland-1" ,
81+ " $custom_sysroot /usr/include/ecore-wl2-1" ,
82+ " $custom_sysroot /usr/include/efl-1" ,
83+ " $custom_sysroot /usr/include/eina-1" ,
84+ " $custom_sysroot /usr/include/eina-1/eina" ,
85+ " $custom_sysroot /usr/include/emile-1" ,
86+ " $custom_sysroot /usr/include/eo-1" ,
87+ " $custom_sysroot /usr/include/evas-1" ,
88+ " $custom_sysroot /usr/include/system" ,
89+ " $custom_sysroot /usr/include/wayland-extension"
8190 ]
8291
83- lib_dirs = [ " //third_party/tizen_tools/sysroot/ $target_cpu /usr/lib" ]
92+ lib_dirs = [ root_out_dir , " $custom_sysroot /usr/lib" ]
8493
8594 cflags_cc = [
8695 " -Wno-newline-eof" ,
@@ -89,26 +98,29 @@ source_set("flutter_tizen") {
8998
9099 libs = [
91100 " base-utils-i18n" ,
101+ " capi-appfw-application" ,
92102 " capi-system-info" ,
93103 " capi-system-system-settings" ,
94104 " dlog" ,
95105 " ecore" ,
96106 " ecore_imf" ,
97107 " ecore_input" ,
98- " ecore_wl2 " ,
108+ " eina " ,
99109 " EGL" ,
100110 " evas" ,
111+ " flutter_engine" ,
101112 " GLESv2" ,
102113 " tbm" ,
103114 " tdm-client" ,
104115 " wayland-client" ,
105116 ]
106- }
107-
108- copy (" publish_headers_tizen" ) {
109- sources = _public_headers
110- outputs = [ " $root_out_dir /{{source_file_part}}" ]
111117
112- # The Tizen header assumes the presence of the common headers.
113- deps = [ " //flutter/shell/platform/common/cpp:publish_headers" ]
118+ if (tizen_sdk_4 ) {
119+ sources += [ " tizen_renderer_ecore_wl.cc" ]
120+ libs += [ " ecore_wayland" , " wayland-egl" ]
121+ defines = [ " FLUTTER_TIZEN_4" ]
122+ } else {
123+ sources += [ " tizen_renderer_ecore_wl2.cc" ]
124+ libs += [ " ecore_wl2" ]
125+ }
114126}
0 commit comments