summaryrefslogtreecommitdiffstats
path: root/cloud_print/virtual_driver/win/port_monitor/BUILD.gn
blob: f6e727f6df2efbcbf47c9dd39ac541281fd9ffe7 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
# Copyright 2015 The Chromium Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.

import("//chrome/version.gni")

assert(is_win)

# When cross-compiling a 64-bit driver for a 32-bit build, some things get name
# mangled with this suffix.
if (target_cpu == "x86" && current_cpu == "x64") {
  arch_suffix = "64"
} else {
  arch_suffix = ""
}

shared_library("port_monitor") {
  output_name = "gcp_portmon$arch_suffix"

  sources = [
    "port_monitor.def",
    "port_monitor_dll.cc",
  ]

  deps = [
    ":lib",
    ":resources",
    "//base",
    "//chrome:version_header",
    "//chrome/common:constants",
  ]

  libs = [ "userenv.lib" ]
}

source_set("lib") {
  sources = [
    "port_monitor.cc",
    "port_monitor.h",
  ]

  deps = [
    "//base",
    "//chrome/common:constants",
    "//chrome/installer/launcher_support",
    "//cloud_print/virtual_driver/win",
  ]
}

process_version("resources") {
  template_file = chrome_version_rc_template
  sources = [
    "../gcp_portmon${arch_suffix}_dll.ver",
  ]

  # Note: target_gen_dir will be different for each toolchain so the output
  # name doesn't need mangling.
  output = "$target_gen_dir/gcp_portmon_dll.rc"
}