Skip to content

Commit b63b3d2

Browse files
committed
Clean up shell/platform/tizen/BUILD.gn
Signed-off-by: MuHong Byun <[email protected]>
1 parent eec4e15 commit b63b3d2

File tree

1 file changed

+61
-69
lines changed

1 file changed

+61
-69
lines changed

shell/platform/tizen/BUILD.gn

+61-69
Original file line numberDiff line numberDiff line change
@@ -227,99 +227,91 @@ test_fixtures("flutter_tizen_fixtures") {
227227
fixtures = []
228228
}
229229

230-
executable("flutter_tizen_unittests") {
231-
testonly = true
230+
template("embedder_executable") {
231+
forward_variables_from(invoker, [ "unit_test" ])
232232

233-
public = _public_headers
233+
if (!defined(unit_test)) {
234+
unit_test = false
235+
}
234236

235-
sources = _flutter_tizen_source
237+
executable("${target_name}") {
238+
if (unit_test) {
239+
testonly = true
240+
}
236241

237-
sources += [
238-
"flutter_tizen_engine_test.cc",
239-
"testing/mock_engine.cc",
240-
"tizen_renderer_evas_gl.cc",
241-
]
242+
public = _public_headers
242243

243-
libs = _libs_minimum
244+
sources = _flutter_tizen_source
244245

245-
libs += [
246-
"ecore_evas",
247-
"elementary",
248-
"evas",
249-
]
246+
sources += [ "tizen_renderer_evas_gl.cc" ]
250247

251-
defines = [ "TIZEN_RENDERER_EVAS_GL" ]
248+
if (defined(invoker.sources)) {
249+
sources += invoker.sources
250+
}
252251

253-
cflags_cc = [
254-
"-Wno-newline-eof",
255-
"-Wno-macro-redefined",
256-
]
252+
libs = _libs_minimum
257253

258-
public_configs = [ "//flutter:config" ]
254+
libs += [
255+
"ecore_evas",
256+
"elementary",
257+
"evas",
258+
]
259259

260-
configs += [
261-
":tizen_rootstrap_include_dirs",
262-
"//flutter/shell/platform/common:desktop_library_implementation",
263-
]
260+
defines = [ "TIZEN_RENDERER_EVAS_GL" ]
264261

265-
public_deps = [ "//third_party/googletest:gtest" ]
262+
cflags_cc = [
263+
"-Wno-newline-eof",
264+
"-Wno-macro-redefined",
265+
]
266266

267-
deps = [
268-
":flutter_tizen_fixtures",
269-
"//flutter/runtime:libdart",
270-
"//flutter/shell/platform/common:common_cpp",
271-
"//flutter/shell/platform/common:common_cpp_input",
272-
"//flutter/shell/platform/common:common_cpp_library_headers",
273-
"//flutter/shell/platform/common/client_wrapper:client_wrapper",
274-
"//flutter/shell/platform/embedder:embedder_headers",
275-
"//flutter/shell/platform/embedder:embedder_test_utils",
276-
"//flutter/testing",
277-
"//third_party/rapidjson",
278-
]
279-
}
267+
public_configs = [ "//flutter:config" ]
280268

281-
executable("flutter_tizen_shell") {
282-
public = _public_headers
269+
configs += [
270+
":tizen_rootstrap_include_dirs",
271+
"//flutter/shell/platform/common:desktop_library_implementation",
272+
]
283273

284-
sources = _flutter_tizen_source
274+
deps = [
275+
"//flutter/runtime:libdart",
276+
"//flutter/shell/platform/common:common_cpp",
277+
"//flutter/shell/platform/common:common_cpp_input",
278+
"//flutter/shell/platform/common:common_cpp_library_headers",
279+
"//flutter/shell/platform/common/client_wrapper:client_wrapper",
280+
"//flutter/shell/platform/embedder:embedder_headers",
281+
"//third_party/rapidjson",
282+
]
285283

286-
sources += [ "tizen_renderer_evas_gl.cc" ]
284+
if (defined(invoker.deps)) {
285+
deps += invoker.deps
286+
}
287287

288-
sources += [ "flutter_tizen_shell.cc" ]
288+
if (defined(invoker.public_deps)) {
289+
public_deps = invoker.public_deps
290+
}
291+
}
292+
}
289293

290-
libs = _libs_minimum
294+
embedder_executable("flutter_tizen_unittests") {
295+
unit_test = true
291296

292-
libs += [
293-
"ecore_evas",
294-
"elementary",
295-
"evas",
297+
sources = [
298+
"flutter_tizen_engine_test.cc",
299+
"testing/mock_engine.cc",
296300
]
297301

298-
defines = [ "TIZEN_RENDERER_EVAS_GL" ]
302+
public_deps = [ "//third_party/googletest:gtest" ]
299303

300-
cflags_cc = [
301-
"-Wno-newline-eof",
302-
"-Wno-macro-redefined",
304+
deps = [
305+
":flutter_tizen_fixtures",
306+
"//flutter/shell/platform/embedder:embedder_test_utils",
307+
"//flutter/testing",
303308
]
309+
}
304310

305-
public_configs = [ "//flutter:config" ]
306-
307-
configs += [
308-
":tizen_rootstrap_include_dirs",
309-
"//flutter/shell/platform/common:desktop_library_implementation",
310-
]
311+
embedder_executable("flutter_tizen_shell") {
312+
sources = [ "flutter_tizen_shell.cc" ]
311313

312314
public_deps = [ ":flutter_engine" ]
313-
314-
deps = [
315-
"//flutter/runtime:libdart",
316-
"//flutter/shell/platform/common:common_cpp",
317-
"//flutter/shell/platform/common:common_cpp_input",
318-
"//flutter/shell/platform/common:common_cpp_library_headers",
319-
"//flutter/shell/platform/common/client_wrapper:client_wrapper",
320-
"//flutter/shell/platform/embedder:embedder_headers",
321-
"//third_party/rapidjson",
322-
]
323315
}
324316

325317
publish_client_wrapper_core("publish_cpp_client_wrapper") {

0 commit comments

Comments
 (0)