Commit fce23e00 authored by rockot's avatar rockot Committed by Commit bot

[device] Add setupapi.lib dependency to //device/serial

BUG=581702
R=thakis@chromium.org

Review URL: https://codereview.chromium.org/1640783002

Cr-Commit-Position: refs/heads/master@{#371846}
parent fd918ae5
...@@ -8,6 +8,14 @@ import("//mojo/public/tools/bindings/mojom.gni") ...@@ -8,6 +8,14 @@ import("//mojo/public/tools/bindings/mojom.gni")
# Library works only on desktop platforms. # Library works only on desktop platforms.
assert(is_win || is_linux || is_mac) assert(is_win || is_linux || is_mac)
config("platform_support") {
visibility = [ ":serial" ]
if (is_win) {
libs = [ "setupapi.lib" ]
ldflags = [ "/DELAYLOAD:setupapi.dll" ]
}
}
# GYP version: device/serial/serial.gyp:device_serial # GYP version: device/serial/serial.gyp:device_serial
static_library("serial") { static_library("serial") {
output_name = "device_serial" output_name = "device_serial"
...@@ -45,11 +53,14 @@ static_library("serial") { ...@@ -45,11 +53,14 @@ static_library("serial") {
"serial_service_impl.h", "serial_service_impl.h",
] ]
public_configs = [ ":platform_support" ]
public_deps = [ public_deps = [
":serial_mojo", ":serial_mojo",
"//base", "//base",
"//device/core", "//device/core",
] ]
deps = [ deps = [
"//mojo/public/cpp/system", "//mojo/public/cpp/system",
"//net", "//net",
......
...@@ -45,6 +45,32 @@ ...@@ -45,6 +45,32 @@
'serial_device_enumerator_linux.h', 'serial_device_enumerator_linux.h',
], ],
}], }],
['OS=="win"', {
'link_settings': {
'msvs_settings': {
'VCLinkerTool': {
'DelayLoadDLLs': [
'setupapi.dll',
],
'AdditionalDependencies': [
'setupapi.lib',
],
},
},
},
'all_dependent_settings': {
'msvs_settings': {
'VCLinkerTool': {
'DelayLoadDLLs': [
'setupapi.dll',
],
'AdditionalDependencies': [
'setupapi.lib',
],
},
},
},
}],
], ],
'dependencies': [ 'dependencies': [
'device_serial_mojo', 'device_serial_mojo',
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment