diff --git a/Cargo.toml b/Cargo.toml
index 6b133053c9d0b264f259a8cf9be7194895547010..a6a2aa769afe5b6e5eaabab2a6f0b1eae54aa65f 100755
--- a/Cargo.toml
+++ b/Cargo.toml
@@ -26,9 +26,9 @@ num-traits = "0.2"
 
 [build-dependencies]
 cmake = "0.1.32"
-pkg-config = "0.3.12"
 
 [target.'cfg(unix)'.build-dependencies]
+pkg-config = "0.3.12"
 bindgen = { version = "0.37", optional = true }
 
 [dev-dependencies]
diff --git a/build.rs b/build.rs
index 295804267467c1b87b98f482e10cd394d775ea51..0a45976ae6eadf1d80e88134b1da79b0998eb24b 100755
--- a/build.rs
+++ b/build.rs
@@ -1,6 +1,7 @@
 // build.rs
 
 extern crate cmake;
+#[cfg(unix)]
 extern crate pkg_config;
 #[cfg(unix)]
 #[cfg(feature = "decode_test")]
@@ -38,20 +39,12 @@ fn main() {
     let _ = fs::remove_file(dst.join("build/CMakeCache.txt"));
 
     #[cfg(windows)] {
-        if dst.join("lib/pkgconfig").join("aom.pc").exists() {
-            env::set_var("PKG_CONFIG_PATH", dst.join("lib/pkgconfig"));
-            pkg_config::Config::new().statik(true).probe("aom").unwrap();
-        } else { // MSVC
-            let bin_dir = if debug {
-                "Debug"
-            } else {
-                "Release"
-            };
-            println!("cargo:rustc-link-search=native={}", dst.join("build").join(bin_dir).to_str().unwrap());
-            println!("cargo:rustc-link-lib=static=aom");
-        }
+        println!("cargo:rustc-link-search=native={}", dst.join("build").to_str().unwrap());
+        println!("cargo:rustc-link-search=native={}", dst.join("build/Debug").to_str().unwrap());
+        println!("cargo:rustc-link-search=native={}", dst.join("build/Release").to_str().unwrap());
+        println!("cargo:rustc-link-lib=static=aom");
     }
-    
+
     #[cfg(unix)] {
         env::set_var("PKG_CONFIG_PATH", dst.join("lib/pkgconfig"));
         let _libs = pkg_config::Config::new().statik(true).probe("aom").unwrap();