BUILD.gn 2.0 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091
  1. # Copyright 2014 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/config/mac/mac_sdk.gni")
  5. import("//testing/test.gni")
  6. import("//third_party/protobuf/proto_library.gni")
  7. proto_library("seatbelt_proto") {
  8. visibility = [ ":*" ]
  9. sources = [ "seatbelt.proto" ]
  10. }
  11. source_set("seatbelt_export") {
  12. sources = [ "seatbelt_export.h" ]
  13. }
  14. component("seatbelt") {
  15. sources = [
  16. "sandbox_compiler.cc",
  17. "sandbox_compiler.h",
  18. "sandbox_logging.cc",
  19. "sandbox_logging.h",
  20. "seatbelt.cc",
  21. "seatbelt.h",
  22. "seatbelt_exec.cc",
  23. "seatbelt_exec.h",
  24. ]
  25. libs = [ "sandbox" ]
  26. deps = [
  27. ":seatbelt_export",
  28. ":seatbelt_proto",
  29. ]
  30. public_deps = [ "//third_party/protobuf:protobuf_lite" ]
  31. defines = [ "SEATBELT_IMPLEMENTATION" ]
  32. }
  33. component("seatbelt_extension") {
  34. sources = [
  35. "seatbelt_extension.cc",
  36. "seatbelt_extension.h",
  37. "seatbelt_extension_token.cc",
  38. "seatbelt_extension_token.h",
  39. ]
  40. deps = [ ":seatbelt_export" ]
  41. libs = [ "sandbox" ]
  42. public_deps = [ "//base" ]
  43. defines = [ "SEATBELT_IMPLEMENTATION" ]
  44. }
  45. component("system_services") {
  46. sources = [
  47. "system_services.cc",
  48. "system_services.h",
  49. ]
  50. frameworks = [
  51. "Carbon.framework",
  52. "CoreFoundation.framework",
  53. ]
  54. deps = [ ":seatbelt_export" ]
  55. public_deps = [ "//base" ]
  56. defines = [ "SEATBELT_IMPLEMENTATION" ]
  57. }
  58. source_set("sandbox_unittests") {
  59. testonly = true
  60. sources = [
  61. "mojom/mojom_traits_unittest.cc",
  62. "sandbox_mac_compiler_unittest.mm",
  63. "sandbox_mac_seatbelt_exec_unittest.cc",
  64. "seatbelt_extension_unittest.cc",
  65. ]
  66. frameworks = [
  67. "CoreFoundation.framework",
  68. "Foundation.framework",
  69. ]
  70. deps = [
  71. ":seatbelt",
  72. ":seatbelt_extension",
  73. ":seatbelt_proto",
  74. "mojom:test_interfaces",
  75. "//base",
  76. "//base/test:test_config",
  77. "//base/test:test_support",
  78. "//mojo/core/test:run_all_unittests",
  79. "//testing/gtest",
  80. ]
  81. }