| # Copyright 2020 The Chromium Authors. All rights reserved. |
| # Use of this source code is governed by a BSD-style license that can be |
| # found in the LICENSE file. |
| |
| import("//build/buildflag_header.gni") |
| import("//build/config/ios/ios_sdk.gni") |
| import("//ios/build/chrome_build.gni") |
| |
| buildflag_header("features") { |
| header = "features.h" |
| flags = [ "ENABLE_WIDGET_KIT_EXTENSION=$ios_enable_widget_kit_extension" ] |
| } |
| |
| if (ios_enable_widget_kit_extension) { |
| source_set("widget_kit") { |
| configs += [ "//build/config/compiler:enable_arc" ] |
| sources = [ |
| "widget_metrics_util.h", |
| "widget_metrics_util.mm", |
| ] |
| |
| deps = [ |
| ":widget_kit_swift", |
| "//base", |
| ] |
| frameworks = [ "Foundation.framework" ] |
| } |
| |
| source_set("widget_kit_swift") { |
| module_name = "widget_kit_swift" |
| |
| configs += [ "//build/config/compiler:enable_arc" ] |
| sources = [ |
| "user_defaults_widget_store.swift", |
| "widget_metrics_logger.swift", |
| ] |
| |
| frameworks = [ |
| "Foundation.framework", |
| "WidgetKit.framework", |
| ] |
| } |
| |
| source_set("unit_tests") { |
| configs += [ "//build/config/compiler:enable_arc" ] |
| testonly = true |
| sources = [] |
| deps = [ |
| ":widget_kit", |
| "//base/test:test_support", |
| "//ios/web/public/test", |
| "//testing/gtest", |
| ] |
| } |
| } |