From b63b3d2c0d349d47df5906e3003e3492d5b532db Mon Sep 17 00:00:00 2001 From: MuHong Byun Date: Thu, 1 Jul 2021 16:27:52 +0900 Subject: [PATCH] Clean up shell/platform/tizen/BUILD.gn Signed-off-by: MuHong Byun --- shell/platform/tizen/BUILD.gn | 130 ++++++++++++++++------------------ 1 file changed, 61 insertions(+), 69 deletions(-) diff --git a/shell/platform/tizen/BUILD.gn b/shell/platform/tizen/BUILD.gn index 29065edcf2191..41ad3a98ad589 100644 --- a/shell/platform/tizen/BUILD.gn +++ b/shell/platform/tizen/BUILD.gn @@ -227,99 +227,91 @@ test_fixtures("flutter_tizen_fixtures") { fixtures = [] } -executable("flutter_tizen_unittests") { - testonly = true +template("embedder_executable") { + forward_variables_from(invoker, [ "unit_test" ]) - public = _public_headers + if (!defined(unit_test)) { + unit_test = false + } - sources = _flutter_tizen_source + executable("${target_name}") { + if (unit_test) { + testonly = true + } - sources += [ - "flutter_tizen_engine_test.cc", - "testing/mock_engine.cc", - "tizen_renderer_evas_gl.cc", - ] + public = _public_headers - libs = _libs_minimum + sources = _flutter_tizen_source - libs += [ - "ecore_evas", - "elementary", - "evas", - ] + sources += [ "tizen_renderer_evas_gl.cc" ] - defines = [ "TIZEN_RENDERER_EVAS_GL" ] + if (defined(invoker.sources)) { + sources += invoker.sources + } - cflags_cc = [ - "-Wno-newline-eof", - "-Wno-macro-redefined", - ] + libs = _libs_minimum - public_configs = [ "//flutter:config" ] + libs += [ + "ecore_evas", + "elementary", + "evas", + ] - configs += [ - ":tizen_rootstrap_include_dirs", - "//flutter/shell/platform/common:desktop_library_implementation", - ] + defines = [ "TIZEN_RENDERER_EVAS_GL" ] - public_deps = [ "//third_party/googletest:gtest" ] + cflags_cc = [ + "-Wno-newline-eof", + "-Wno-macro-redefined", + ] - deps = [ - ":flutter_tizen_fixtures", - "//flutter/runtime:libdart", - "//flutter/shell/platform/common:common_cpp", - "//flutter/shell/platform/common:common_cpp_input", - "//flutter/shell/platform/common:common_cpp_library_headers", - "//flutter/shell/platform/common/client_wrapper:client_wrapper", - "//flutter/shell/platform/embedder:embedder_headers", - "//flutter/shell/platform/embedder:embedder_test_utils", - "//flutter/testing", - "//third_party/rapidjson", - ] -} + public_configs = [ "//flutter:config" ] -executable("flutter_tizen_shell") { - public = _public_headers + configs += [ + ":tizen_rootstrap_include_dirs", + "//flutter/shell/platform/common:desktop_library_implementation", + ] - sources = _flutter_tizen_source + deps = [ + "//flutter/runtime:libdart", + "//flutter/shell/platform/common:common_cpp", + "//flutter/shell/platform/common:common_cpp_input", + "//flutter/shell/platform/common:common_cpp_library_headers", + "//flutter/shell/platform/common/client_wrapper:client_wrapper", + "//flutter/shell/platform/embedder:embedder_headers", + "//third_party/rapidjson", + ] - sources += [ "tizen_renderer_evas_gl.cc" ] + if (defined(invoker.deps)) { + deps += invoker.deps + } - sources += [ "flutter_tizen_shell.cc" ] + if (defined(invoker.public_deps)) { + public_deps = invoker.public_deps + } + } +} - libs = _libs_minimum +embedder_executable("flutter_tizen_unittests") { + unit_test = true - libs += [ - "ecore_evas", - "elementary", - "evas", + sources = [ + "flutter_tizen_engine_test.cc", + "testing/mock_engine.cc", ] - defines = [ "TIZEN_RENDERER_EVAS_GL" ] + public_deps = [ "//third_party/googletest:gtest" ] - cflags_cc = [ - "-Wno-newline-eof", - "-Wno-macro-redefined", + deps = [ + ":flutter_tizen_fixtures", + "//flutter/shell/platform/embedder:embedder_test_utils", + "//flutter/testing", ] +} - public_configs = [ "//flutter:config" ] - - configs += [ - ":tizen_rootstrap_include_dirs", - "//flutter/shell/platform/common:desktop_library_implementation", - ] +embedder_executable("flutter_tizen_shell") { + sources = [ "flutter_tizen_shell.cc" ] public_deps = [ ":flutter_engine" ] - - deps = [ - "//flutter/runtime:libdart", - "//flutter/shell/platform/common:common_cpp", - "//flutter/shell/platform/common:common_cpp_input", - "//flutter/shell/platform/common:common_cpp_library_headers", - "//flutter/shell/platform/common/client_wrapper:client_wrapper", - "//flutter/shell/platform/embedder:embedder_headers", - "//third_party/rapidjson", - ] } publish_client_wrapper_core("publish_cpp_client_wrapper") {