chromium/ios/chrome/common/BUILD.gn

# Copyright 2015 The Chromium Authors
# 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")

source_set("common") {
  sources = [
    "channel_info.h",
    "channel_info.mm",
    "x_callback_url.cc",
    "x_callback_url.h",
  ]

  deps = [
    "//base",
    "//build:branding_buildflags",
    "//components/version_info",
    "//components/version_info:version_string",
    "//ios/chrome/common/app_group:main_app",
    "//net",
    "//url",
  ]
  public_deps = [ ":timing" ]
}

source_set("constants") {
  sources = [
    "constants.h",
    "constants.mm",
  ]
  frameworks = [ "Foundation.framework" ]
}

source_set("extension_open_url") {
  sources = [
    "extension_open_url.h",
    "extension_open_url.mm",
  ]

  frameworks = [
    "Foundation.framework",
    "UIKit.framework",
  ]
}

source_set("string_util") {
  sources = [
    "string_util.h",
    "string_util.mm",
  ]
  deps = [ "//base" ]
  frameworks = [ "UIKit.framework" ]
}

source_set("timing") {
  sources = [
    "material_timing.h",
    "material_timing.mm",
  ]

  frameworks = [ "QuartzCore.framework" ]
}

source_set("unit_tests") {
  testonly = true
  sources = [
    "block_unittest.mm",
    "ns_regular_expression_unittest.mm",
    "string_util_unittest.mm",
    "x_callback_url_unittest.cc",
  ]
  deps = [
    ":common",
    ":string_util",
    "//base",
    "//base/test:test_support",
    "//ios/chrome/common/ui/colors",
    "//ios/chrome/common/ui/util:util",
    "//testing/gtest",
    "//url:url",
  ]
}

buildflag_header("ios_app_bundle_id_prefix_buildflags") {
  header = "ios_app_bundle_id_prefix_buildflags.h"
  flags = [ "IOS_APP_BUNDLE_ID_PREFIX=\"$ios_app_bundle_id_prefix\"" ]
}