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
5import("//build/config/mac/mac_sdk.gni")
6import("//testing/test.gni")
7
8component("sandbox") {
9  sources = [
10    "bootstrap_sandbox.cc",
11    "bootstrap_sandbox.h",
12    "launchd_interception_server.cc",
13    "launchd_interception_server.h",
14    "mach_message_server.cc",
15    "mach_message_server.h",
16    "message_server.h",
17    "os_compatibility.cc",
18    "os_compatibility.h",
19    "policy.cc",
20    "policy.h",
21    "pre_exec_delegate.cc",
22    "pre_exec_delegate.h",
23    "xpc.h",
24    "xpc_message_server.cc",
25    "xpc_message_server.h",
26  ]
27
28  defines = [ "SANDBOX_IMPLEMENTATION" ]
29  libs = [ "bsm" ]
30
31  deps = [
32    "//base",
33  ]
34}
35
36component("seatbelt") {
37  sources = [
38    "seatbelt.cc",
39    "seatbelt.h",
40    "seatbelt_export.h",
41  ]
42  libs = [ "sandbox" ]
43  defines = [ "SEATBELT_IMPLEMENTATION" ]
44}
45
46test("sandbox_mac_unittests") {
47  sources = [
48    "bootstrap_sandbox_unittest.mm",
49    "policy_unittest.cc",
50    "xpc_message_server_unittest.cc",
51  ]
52
53  libs = [
54    "CoreFoundation.framework",
55    "Foundation.framework",
56  ]
57
58  deps = [
59    ":sandbox",
60    "//base",
61    "//base/test:run_all_unittests",
62    "//testing/gtest",
63  ]
64}
65