From 4f63aa46345fac4e83131463c5bda2887b27cbec Mon Sep 17 00:00:00 2001 From: Bert Belder Date: Sun, 13 Jan 2019 23:43:00 +0100 Subject: [PATCH] build: winapi is a windows-only dep --- BUILD.gn | 4 +++- Cargo.toml | 2 ++ 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/BUILD.gn b/BUILD.gn index e6fb672f4a..23192cd325 100644 --- a/BUILD.gn +++ b/BUILD.gn @@ -43,8 +43,10 @@ main_extern = [ "$rust_build:tokio_process", "$rust_build:tokio_threadpool", "$rust_build:url", - "$rust_build:winapi", ] +if (is_win) { + main_extern += [ "$rust_build:winapi" ] +} ts_sources = [ "js/assets.ts", diff --git a/Cargo.toml b/Cargo.toml index 5c86d526cf..794fa48610 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -34,4 +34,6 @@ tokio-io = "=0.1.10" tokio-process = "=0.2.3" tokio-threadpool = "=0.1.9" url = "=1.7.2" + +[target.'cfg(windows)'.dependencies] winapi = "=0.3.6"