BUILD.gn 2.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899
  1. # Copyright 2015 The Chromium Authors. All rights reserved.
  2. # Use of this source code is governed by a BSD-style license that can be
  3. # found in the LICENSE file.
  4. import("//build/buildflag_header.gni")
  5. import("//build/config/ios/ios_sdk.gni")
  6. source_set("common") {
  7. configs += [ "//build/config/compiler:enable_arc" ]
  8. sources = [
  9. "channel_info.h",
  10. "channel_info.mm",
  11. "x_callback_url.cc",
  12. "x_callback_url.h",
  13. ]
  14. deps = [
  15. "//base",
  16. "//build:branding_buildflags",
  17. "//components/version_info",
  18. "//components/version_info:version_string",
  19. "//ios/chrome/common/app_group:main_app",
  20. "//net",
  21. "//url",
  22. ]
  23. public_deps = [ ":timing" ]
  24. }
  25. source_set("constants") {
  26. configs += [ "//build/config/compiler:enable_arc" ]
  27. sources = [
  28. "constants.h",
  29. "constants.mm",
  30. ]
  31. frameworks = [ "Foundation.framework" ]
  32. }
  33. source_set("string_util") {
  34. sources = [
  35. "string_util.h",
  36. "string_util.mm",
  37. ]
  38. deps = [ "//base" ]
  39. configs += [ "//build/config/compiler:enable_arc" ]
  40. frameworks = [ "UIKit.framework" ]
  41. }
  42. source_set("timing") {
  43. sources = [
  44. "material_timing.h",
  45. "material_timing.mm",
  46. ]
  47. frameworks = [ "QuartzCore.framework" ]
  48. configs += [ "//build/config/compiler:enable_arc" ]
  49. }
  50. source_set("unit_tests") {
  51. testonly = true
  52. sources = [
  53. "block_unittest.mm",
  54. "ns_regular_expression_unittest.mm",
  55. "string_util_unittest.mm",
  56. "x_callback_url_unittest.cc",
  57. ]
  58. deps = [
  59. ":common",
  60. ":noarc_unit_tests",
  61. ":string_util",
  62. "//base",
  63. "//base/test:test_support",
  64. "//ios/chrome/common/ui/colors",
  65. "//ios/chrome/common/ui/util:util",
  66. "//testing/gtest",
  67. ]
  68. configs += [ "//build/config/compiler:enable_arc" ]
  69. }
  70. # The block_unittest.mm has been duplicated during the migration of iOS code
  71. # to ARC (see crbug.com/624363). As this test checks the interaction of C++
  72. # objects and Objective-C blocks, it is necessary to keep two version of the
  73. # test compiled with and without ARC. Remove this file when the conversion to
  74. # ARC is complete.
  75. source_set("noarc_unit_tests") {
  76. visibility = [ ":unit_tests" ]
  77. testonly = true
  78. sources = [ "noarc_block_unittest.mm" ]
  79. deps = [
  80. ":common",
  81. "//base",
  82. "//testing/gtest",
  83. ]
  84. }
  85. buildflag_header("ios_app_bundle_id_prefix_buildflags") {
  86. header = "ios_app_bundle_id_prefix_buildflags.h"
  87. flags = [ "IOS_APP_BUNDLE_ID_PREFIX=\"$ios_app_bundle_id_prefix\"" ]
  88. }