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 = [ "CHROME_BUNDLE_ID=$chrome_mac_bundle_id" ] |
| 14 |
| 15 sources = [ |
| 16 "alert_notification_service.h", |
| 17 "alert_notification_service.mm", |
| 18 "notification_service_delegate.h", |
| 19 "notification_service_delegate.mm", |
| 20 "xpc_service_main.mm", |
| 21 ] |
| 22 |
| 23 deps = [ |
| 24 ":common", |
| 25 "//base:base", |
| 26 ] |
| 27 |
| 28 libs = [ |
| 29 "AppKit.framework", |
| 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 deps = [ |
17 "//base", | 57 "//base:base", |
18 ] | 58 ] |
19 } | 59 } |
OLD | NEW |