OLD | NEW |
---|---|
1 # Copyright 2016 The Chromium Authors. All rights reserved. | 1 # Copyright 2016 The Chromium Authors. All rights reserved. |
2 # Use of this source code is governed by a BSD-style license that can be | 2 # Use of this source code is governed by a BSD-style license that can be |
3 # found in the LICENSE file. | 3 # found in the LICENSE file. |
4 | 4 |
5 import("//build/util/branding.gni") | |
6 import("//build/config/mac/rules.gni") | |
7 | |
8 mac_app_bundle("alert_notification_xpc_service") { | |
9 output_name = "AlertNotificationService" | |
10 package_type = "xpc" | |
11 | |
12 info_plist = "xpc-Info.plist" | |
13 extra_substitutions = | |
14 [ "PRODUCT_BUNDLE_IDENTIFIER=$chrome_mac_bundle_id.$output_name" ] | |
Robert Sesek
2016/09/29 14:23:04
The convention for setting the bundle ID is to dec
Miguel Garcia
2016/10/03 16:07:50
Ok, let's see if I got this right, in the .plist I
Robert Sesek
2016/10/04 16:04:25
Yes, that works. ${output_name} won't work but ${E
| |
15 | |
16 sources = [ | |
17 "alert_notification_service.h", | |
18 "alert_notification_service.mm", | |
19 "notification_service_delegate.h", | |
20 "notification_service_delegate.mm", | |
21 "xpc_service_main.mm", | |
22 ] | |
23 | |
24 deps = [ | |
25 ":common", | |
26 ] | |
27 | |
28 libs = [ | |
29 "AppKit.framework", | |
Robert Sesek
2016/09/29 14:23:04
Do you need AppKit?
Miguel Garcia
2016/10/03 16:07:50
Yes (for NSImage).
| |
30 "Foundation.framework", | |
31 ] | |
32 | |
33 ldflags = [] | |
34 if (is_component_build) { | |
35 ldflags += [ | |
36 # The XPC service is in Chromium.app/Contents/Versions/X/Chromium \ | |
37 # Framework.framework/XPCServices/AlertNotificationService.xpc/\ | |
38 # Contents/MacOS/ so set rpath up to the base. | |
39 "-rpath", | |
40 "@loader_path/../../../../../../../../../", | |
41 ] | |
42 } | |
43 } | |
44 | |
5 static_library("common") { | 45 static_library("common") { |
6 sources = [ | 46 sources = [ |
7 "notification_builder_mac.h", | 47 "notification_builder_mac.h", |
8 "notification_builder_mac.mm", | 48 "notification_builder_mac.mm", |
9 "notification_constants_mac.h", | 49 "notification_constants_mac.h", |
10 "notification_constants_mac.mm", | 50 "notification_constants_mac.mm", |
11 "notification_delivery.h", | 51 "notification_delivery.h", |
12 "notification_response_builder_mac.h", | 52 "notification_response_builder_mac.h", |
13 "notification_response_builder_mac.mm", | 53 "notification_response_builder_mac.mm", |
14 ] | 54 ] |
15 | 55 |
16 deps = [ | 56 public_deps = [ |
Robert Sesek
2016/09/29 14:23:04
Leave this as deps and add an explicit deps on bas
Miguel Garcia
2016/10/03 16:07:50
Done.
| |
17 "//base", | 57 "//base:base", |
18 ] | 58 ] |
19 } | 59 } |
OLD | NEW |