Remove unwanted build dependents for default build

This commit is contained in:
2022-03-17 11:28:28 +08:00
parent ade48a8013
commit 6e049fdb23
2 changed files with 10 additions and 3 deletions

View File

@@ -26,11 +26,11 @@ urlparse = "0.7"
utf16string = { version= "0.2", optional = true }
[build-dependencies]
cmake = "0.1"
bindgen = "0.59"
bindgen = { version = "0.59", optional = true }
cmake = { version = "0.1", optional = true }
[features]
exif = ["c_fixed_string", "link-cplusplus", "int-enum", "utf16string"]
exif = ["bindgen", "c_fixed_string", "cmake", "link-cplusplus", "int-enum", "utf16string"]
[target.'cfg(windows)'.dependencies]
winapi = { version = "0.3.9", features = ["winnls", "stringapiset"] }

View File

@@ -1,10 +1,17 @@
#[cfg(feature = "bindgen")]
extern crate bindgen;
#[cfg(feature = "cmake")]
extern crate cmake;
#[cfg(any(feature = "exif"))]
use std::env;
#[cfg(any(feature = "exif"))]
use std::fs::create_dir;
#[cfg(any(feature = "exif"))]
use std::fs::File;
#[cfg(any(feature = "exif"))]
use std::io::Read;
#[cfg(any(feature = "exif"))]
use std::path::PathBuf;
fn main() {