| Index: cloud_print/virtual_driver/win/port_monitor/BUILD.gn
|
| diff --git a/cloud_print/virtual_driver/win/port_monitor/BUILD.gn b/cloud_print/virtual_driver/win/port_monitor/BUILD.gn
|
| new file mode 100644
|
| index 0000000000000000000000000000000000000000..d3d8b63ed4a3697418405a9bffd2498c136c682c
|
| --- /dev/null
|
| +++ b/cloud_print/virtual_driver/win/port_monitor/BUILD.gn
|
| @@ -0,0 +1,84 @@
|
| +# 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/process_version_rc_template.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 = ""
|
| +}
|
| +
|
| +# When compiling a 64-bit port monitor from a 32-bit build, copy the DLL to the
|
| +# root build directory. When targeting 64-bit CPUs, there is no cross-compiling
|
| +# so nothing extra needs to happen.
|
| +if (target_cpu == "x86" && current_cpu == "x64") {
|
| + copy("port_monitor") {
|
| + sources = [
|
| + "$root_out_dir/gcp_portmon64.dll",
|
| + ]
|
| + outputs = [
|
| + "$root_build_dir/gcp_portmon64.dll",
|
| + ]
|
| + deps = [
|
| + ":port_monitor_dll",
|
| + ]
|
| + }
|
| +} else {
|
| + group("port_monitor") {
|
| + public_deps = [
|
| + ":port_monitor_dll",
|
| + ]
|
| + }
|
| +}
|
| +
|
| +shared_library("port_monitor_dll") {
|
| + output_name = "gcp_portmon$arch_suffix"
|
| +
|
| + sources = [
|
| + "port_monitor.def",
|
| + "port_monitor_dll.cc",
|
| + ]
|
| +
|
| + deps = [
|
| + ":lib",
|
| + ":resources",
|
| + "//base",
|
| + "//chrome/common:constants",
|
| + "//chrome/common:version_header",
|
| + "//cloud_print/common",
|
| + "//cloud_print/virtual_driver/win",
|
| + ]
|
| +
|
| + libs = [ "userenv.lib" ]
|
| +}
|
| +
|
| +source_set("lib") {
|
| + sources = [
|
| + "port_monitor.cc",
|
| + "port_monitor.h",
|
| + ]
|
| +
|
| + deps = [
|
| + "//base",
|
| + "//chrome/common:constants",
|
| + "//chrome/installer/launcher_support",
|
| + "//cloud_print/common",
|
| + "//cloud_print/virtual_driver/win",
|
| + ]
|
| +}
|
| +
|
| +process_version_rc_template("resources") {
|
| + 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"
|
| +}
|
|
|