forked from flutter/engine
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathBUILD.gn
More file actions
225 lines (186 loc) · 6.13 KB
/
BUILD.gn
File metadata and controls
225 lines (186 loc) · 6.13 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
# Copyright 2020 Samsung Electronics Co., Ltd. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
import("//flutter/shell/platform/common/cpp/client_wrapper/publish.gni")
import("//flutter/shell/platform/tizen/config.gni")
# Sets the rpath of dependent targets (shared libs) to $ORIGIN.
# We assume that the flutter_engine library exists next to the embedder library
# when they are deployed on Tizen devices.
config("tizen_embedder_rpath") {
ldflags = [ "-Wl,-rpath,\$ORIGIN" ]
}
source_set("flutter_engine") {
visibility = [ ":*" ]
libs = [ "flutter_engine" ]
lib_dirs = [ root_out_dir ]
public_configs = [ ":tizen_embedder_rpath" ]
deps = [ "//flutter/shell/platform/embedder:flutter_engine" ]
}
_public_headers = [
"public/flutter_platform_view.h",
"public/flutter_tizen_texture_registrar.h",
"public/flutter_tizen.h",
]
# Tizen native headers assume that the following include dirs are already
# added to the compiler's search paths. Since we are not using the Tizen CLI
# builder, we have to add them manually.
config("tizen_rootstrap_include_dirs") {
include_dirs = [
"$custom_sysroot/usr/include",
"$custom_sysroot/usr/include/appfw",
"$custom_sysroot/usr/include/base",
"$custom_sysroot/usr/include/dlog",
"$custom_sysroot/usr/include/ecore-1",
"$custom_sysroot/usr/include/ecore-evas-1",
"$custom_sysroot/usr/include/ecore-imf-1",
"$custom_sysroot/usr/include/ecore-imf-evas-1",
"$custom_sysroot/usr/include/ecore-input-1",
"$custom_sysroot/usr/include/ecore-wayland-1",
"$custom_sysroot/usr/include/ecore-wl2-1",
"$custom_sysroot/usr/include/efl-1",
"$custom_sysroot/usr/include/eina-1",
"$custom_sysroot/usr/include/eina-1/eina",
"$custom_sysroot/usr/include/emile-1",
"$custom_sysroot/usr/include/eo-1",
"$custom_sysroot/usr/include/evas-1",
"$custom_sysroot/usr/include/feedback",
"$custom_sysroot/usr/include/system",
"$custom_sysroot/usr/include/wayland-extension",
# For Evas_GL.
"$custom_sysroot/usr/include/ecore-con-1",
"$custom_sysroot/usr/include/ecore-file-1",
"$custom_sysroot/usr/include/edje-1",
"$custom_sysroot/usr/include/eet-1",
"$custom_sysroot/usr/include/efl-1/interfaces",
"$custom_sysroot/usr/include/efreet-1",
"$custom_sysroot/usr/include/elementary-1",
"$custom_sysroot/usr/include/ethumb-1",
"$custom_sysroot/usr/include/ethumb-client-1",
]
lib_dirs = [ "$custom_sysroot/usr/lib" ]
}
# Template for the embedder build. Used to generate embedders for different
# device profiles. The output library name is "flutter_tizen_[profile]".
#
# If use_evas_gl_renderer is provided as true, the Evas_GL renderer is used,
# otherwise the Ecore_Wl2 renderer is used.
template("embedder_for_profile") {
forward_variables_from(invoker, [ "use_evas_gl_renderer" ])
if (!defined(use_evas_gl_renderer)) {
use_evas_gl_renderer = false
}
shared_library("flutter_tizen_${target_name}") {
public = _public_headers
sources = [
"channels/key_event_channel.cc",
"channels/lifecycle_channel.cc",
"channels/localization_channel.cc",
"channels/navigation_channel.cc",
"channels/platform_channel.cc",
"channels/platform_view_channel.cc",
"channels/settings_channel.cc",
"channels/text_input_channel.cc",
"external_texture_gl.cc",
"flutter_tizen_engine.cc",
"flutter_tizen.cc",
"key_event_handler.cc",
"tizen_event_loop.cc",
"tizen_log.cc",
"tizen_renderer.cc",
"touch_event_handler.cc",
]
libs = [
"base-utils-i18n",
"capi-appfw-application",
"capi-base-common",
"capi-system-info",
"capi-system-system-settings",
"dlog",
"ecore",
"ecore_imf",
"ecore_input",
"eina",
"evas",
"EGL",
"feedback",
"GLESv2",
"tbm",
"tdm-client",
"wayland-client",
]
defines = invoker.defines
if (use_evas_gl_renderer) {
sources += [ "tizen_renderer_evas_gl.cc" ]
libs += [
"ecore_evas",
"elementary",
]
defines += [ "TIZEN_RENDERER_EVAS_GL" ]
} else {
sources += [
"tizen_renderer_ecore_wl2.cc",
"tizen_vsync_waiter.cc",
]
libs += [ "ecore_wl2" ]
}
cflags_cc = [
"-Wno-newline-eof",
"-Wno-macro-redefined",
]
configs += [
":tizen_rootstrap_include_dirs",
"//flutter/shell/platform/common/cpp:desktop_library_implementation"
]
public_configs = [ "//flutter:config" ]
public_deps = [ ":flutter_engine" ]
deps = [
"//flutter/shell/platform/common/cpp:common_cpp",
"//flutter/shell/platform/common/cpp:common_cpp_input",
"//flutter/shell/platform/common/cpp:common_cpp_library_headers",
"//flutter/shell/platform/common/cpp/client_wrapper:client_wrapper",
"//third_party/rapidjson",
]
}
}
embedder_for_profile("mobile") {
defines = [ "MOBILE_PROFILE" ]
}
embedder_for_profile("wearable") {
defines = [ "WEARABLE_PROFILE" ]
use_evas_gl_renderer = true
}
embedder_for_profile("tv") {
defines = [ "TV_PROFILE" ]
}
embedder_for_profile("common") {
defines = [ "COMMON_PROFILE" ]
}
publish_client_wrapper_core("publish_cpp_client_wrapper") {
visibility = [ ":*" ]
}
_common_cpp_public_headers = [
"//flutter/shell/platform/common/cpp/public/flutter_export.h",
"//flutter/shell/platform/common/cpp/public/flutter_messenger.h",
"//flutter/shell/platform/common/cpp/public/flutter_plugin_registrar.h",
"//flutter/shell/platform/common/cpp/public/flutter_texture_registrar.h",
]
copy("publish_headers_tizen") {
sources = _public_headers + _common_cpp_public_headers
outputs = [ "$root_out_dir/public/{{source_file_part}}" ]
}
copy("copy_icu") {
visibility = [ ":*" ]
sources = [ "//third_party/icu/flutter/icudtl.dat" ]
outputs = [ "$root_out_dir/icu/{{source_file_part}}" ]
}
group("tizen") {
deps = [
":flutter_tizen_mobile",
":flutter_tizen_wearable",
":flutter_tizen_tv",
":flutter_tizen_common",
":publish_cpp_client_wrapper",
":publish_headers_tizen",
":copy_icu",
]
}