OLD | NEW |
1 # Copyright 2015 The Chromium Authors. All rights reserved. | 1 # Copyright 2015 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/config/features.gni") | |
6 import("//tools/grit/grit_rule.gni") | 5 import("//tools/grit/grit_rule.gni") |
7 | 6 |
8 config("internal_config") { | 7 source_set("cloud_print_service_lib") { |
9 defines = [ | |
10 "SECURITY_WIN32", | |
11 "STRICT", | |
12 "_ATL_APARTMENT_THREADED", | |
13 "_ATL_CSTRING_EXPLICIT_CONSTRUCTORS", | |
14 "_ATL_NO_COM_SUPPORT", | |
15 "_ATL_NO_AUTOMATIC_NAMESPACE", | |
16 "_ATL_NO_EXCEPTIONS", | |
17 ] | |
18 } | |
19 | |
20 if (is_win && is_clang) { | |
21 # service_controller.h uses DECLARE_REGISTRY_APPID_RESOURCEID, which | |
22 # in msvs2013 returns string literals via a non-const pointer. So | |
23 # disable this warning for now. | |
24 # TODO(thakis): Remove this once we're on 2014, | |
25 # https://connect.microsoft.com/VisualStudio/feedback/details/806376/atl-hindr
ances-to-adopting-new-strictstrings-conformance-option-in-vs2013 | |
26 config("service_warning_config") { | |
27 cflags = [ "-Wno-writable-strings" ] | |
28 } | |
29 } | |
30 | |
31 source_set("lib") { | |
32 sources = [ | 8 sources = [ |
| 9 "//cloud_print/common/win/cloud_print_utils.cc", |
| 10 "//cloud_print/common/win/cloud_print_utils.h", |
33 "service_constants.cc", | 11 "service_constants.cc", |
34 "service_constants.h", | 12 "service_constants.h", |
35 "service_state.cc", | 13 "service_state.cc", |
36 "service_state.h", | 14 "service_state.h", |
37 "service_switches.cc", | 15 "service_switches.cc", |
38 "service_switches.h", | 16 "service_switches.h", |
39 "win/chrome_launcher.cc", | 17 "win/chrome_launcher.cc", |
40 "win/chrome_launcher.h", | 18 "win/chrome_launcher.h", |
41 "win/local_security_policy.cc", | 19 "win/local_security_policy.cc", |
42 "win/local_security_policy.h", | 20 "win/local_security_policy.h", |
43 "win/service_controller.cc", | 21 "win/service_controller.cc", |
44 "win/service_controller.h", | 22 "win/service_controller.h", |
45 "win/service_listener.cc", | 23 "win/service_listener.cc", |
46 "win/service_listener.h", | 24 "win/service_listener.h", |
47 "win/service_utils.cc", | 25 "win/service_utils.cc", |
48 "win/service_utils.h", | 26 "win/service_utils.h", |
49 "win/setup_listener.cc", | 27 "win/setup_listener.cc", |
50 "win/setup_listener.h", | 28 "win/setup_listener.h", |
51 ] | 29 ] |
52 | 30 |
53 configs += [ | |
54 ":internal_config", | |
55 "//build/config/compiler:wexit_time_destructors", | |
56 ] | |
57 | |
58 deps = [ | 31 deps = [ |
59 ":resources", | 32 ":service_resources", |
60 "//base", | 33 "//base", |
61 "//base:base_static", | 34 "//base:base_static", |
62 "//base/third_party/dynamic_annotations", | 35 "//base/third_party/dynamic_annotations", |
63 "//chrome/common:constants", | 36 "//content/public/common", |
64 "//cloud_print/common", | |
65 "//components/cloud_devices/common", | |
66 "//content/public/common:static_switches", | |
67 "//google_apis", | 37 "//google_apis", |
68 "//ipc", | 38 "//ipc", |
69 "//net", | 39 "//net", |
70 "//url", | 40 "//url", |
71 ] | 41 ] |
72 | 42 |
73 if (enable_basic_printing || enable_print_preview) { | |
74 deps += [ "//printing" ] | |
75 } | |
76 | |
77 if (is_win) { | |
78 deps += [ | |
79 "//chrome/common:constants", | |
80 "//chrome/installer/launcher_support", | |
81 ] | |
82 } | |
83 | |
84 if (is_clang) { | 43 if (is_clang) { |
85 cflags = [ "-Wno-parentheses" ] | 44 cflags = [ "-Wno-parentheses" ] |
86 if (is_win) { | |
87 public_configs = [ ":service_warning_config" ] | |
88 } | |
89 } | 45 } |
90 } | 46 } |
91 | 47 |
92 grit("resources") { | 48 grit("service_resources") { |
93 source = "win/service_resources.grd" | 49 source = "win/service_resources.grd" |
94 outputs = [ | 50 outputs = [ |
95 "resources.h", | 51 "resources.h", |
96 "service_resources_en.rc", | 52 "service_resources_en.rc", |
97 ] | 53 ] |
98 } | 54 } |
OLD | NEW |