Add ICU message format support
[chromium-blink-merge.git] / sandbox / mac / sandbox_mac.gypi
blob32bef72f53b7ba611a434d0fe10b51e2a7894b2c
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.
6   'targets': [
7     {
8       'target_name': 'sandbox',
9       'type': '<(component)',
10       'sources': [
11         'bootstrap_sandbox.cc',
12         'bootstrap_sandbox.h',
13         'launchd_interception_server.cc',
14         'launchd_interception_server.h',
15         'mach_message_server.cc',
16         'mach_message_server.h',
17         'message_server.h',
18         'os_compatibility.cc',
19         'os_compatibility.h',
20         'policy.cc',
21         'policy.h',
22         'xpc.cc',
23         'xpc.h',
24         'xpc_message_server.cc',
25         'xpc_message_server.h',
26       ],
27       'dependencies': [
28         '../base/base.gyp:base',
29       ],
30       'include_dirs': [
31         '..',
32         '<(SHARED_INTERMEDIATE_DIR)',
33       ],
34       'defines': [
35         'SANDBOX_IMPLEMENTATION',
36       ],
37       'link_settings': {
38         'libraries': [
39           '$(SDKROOT)/usr/lib/libbsm.dylib',
40         ],
41       },
42       'conditions': [
43         # When the build SDK is 10.6, generate a dynamic stub loader. When the
44         # SDK is higher, then libxpc.dylib will be loaded automatically as part
45         # of libSystem, and only forward declarations of private symbols are
46         # necessary.
47         ['mac_sdk == "10.6"', {
48           'actions': [
49             {
50               'variables': {
51                 'generate_stubs_script': '../tools/generate_stubs/generate_stubs.py',
52                 'generate_stubs_header_path': 'xpc_stubs_header.fragment',
53                 'generate_stubs_sig_public_path': 'xpc_stubs.sig',
54                 'generate_stubs_sig_private_path': 'xpc_private_stubs.sig',
55                 'generate_stubs_project': 'sandbox/mac',
56                 'generate_stubs_output_stem': 'xpc_stubs',
57               },
58               'action_name': 'generate_stubs',
59               'inputs': [
60                 '<(generate_stubs_script)',
61                 '<(generate_stubs_header_path)',
62                 '<(generate_stubs_sig_public_path)',
63                 '<(generate_stubs_sig_private_path)',
64               ],
65               'outputs': [
66                 '<(INTERMEDIATE_DIR)/<(generate_stubs_output_stem).cc',
67                 '<(SHARED_INTERMEDIATE_DIR)/<(generate_stubs_project)/<(generate_stubs_output_stem).h',
68               ],
69               'action': [
70                 'python',
71                 '<(generate_stubs_script)',
72                 '-i', '<(INTERMEDIATE_DIR)',
73                 '-o', '<(SHARED_INTERMEDIATE_DIR)/<(generate_stubs_project)',
74                 '-t', 'posix_stubs',
75                 '-e', '<(generate_stubs_header_path)',
76                 '-s', '<(generate_stubs_output_stem)',
77                 '-p', '<(generate_stubs_project)',
78                 '-x', 'SANDBOX_EXPORT',
79                 '<(generate_stubs_sig_public_path)',
80                 '<(generate_stubs_sig_private_path)',
81               ],
82               'process_outputs_as_sources': 1,
83               'message': 'Generating XPC stubs for 10.6 compatability.',
84             },
85           ],
86         }],
87       ],
88     },
89     {
90       'target_name': 'sandbox_mac_unittests',
91       'type': 'executable',
92       'sources': [
93         'bootstrap_sandbox_unittest.mm',
94         'policy_unittest.cc',
95         'xpc_message_server_unittest.cc',
96       ],
97       'dependencies': [
98         'sandbox',
99         '../base/base.gyp:base',
100         '../base/base.gyp:run_all_unittests',
101         '../testing/gtest.gyp:gtest',
102       ],
103       'include_dirs': [
104         '..',
105       ],
106       'link_settings': {
107         'libraries': [
108           '$(SDKROOT)/System/Library/Frameworks/CoreFoundation.framework',
109           '$(SDKROOT)/System/Library/Frameworks/Foundation.framework',
110         ],
111       },
112     },
113   ],
114   'conditions': [
115     ['test_isolation_mode != "noop"', {
116       'targets': [
117         {
118           'target_name': 'sandbox_mac_unittests_run',
119           'type': 'none',
120           'dependencies': [
121             'sandbox_mac_unittests',
122           ],
123           'includes': [ '../../build/isolate.gypi' ],
124           'sources': [ '../sandbox_mac_unittests.isolate' ],
125         },
126       ],
127     }],
128   ],