diff --git a/.github/workflows/check_windows.yml b/.github/workflows/check_windows.yml index 967d80fb..19960ec5 100644 --- a/.github/workflows/check_windows.yml +++ b/.github/workflows/check_windows.yml @@ -1,6 +1,6 @@ on: [push] -name: Windows Check no default features +name: Windows Check jobs: check: strategy: @@ -31,9 +31,11 @@ jobs: - name: Update Rust run: rustup update - - name: cargo build - run: cargo build + # - name: cargo build + # run: cargo build - name: cargo check without default features run: cargo check --no-default-features + - name: cargo check build features + run: cargo check --features heif \ No newline at end of file diff --git a/build.rs b/build.rs index 8c52e6b6..ae49917f 100644 --- a/build.rs +++ b/build.rs @@ -29,6 +29,18 @@ fn setup_heif() { Command::new("make").status().unwrap(); println!("cargo:rustc-link-search=native={}", "libheif"); } + + #[cfg(target_os = "windows")] + { + Command::new("git") + .args(["clone", "https://github.com/Microsoft/vcpkg.git"]) + .status() + .unwrap(); + Command::new("cd").args(["vcpkg"]).status().unwrap(); + Command::new("./bootstrap-vcpkg.bat").status().unwrap(); + Command::new("./vcpkg").args(["integrate", "install"]).status().unwrap(); + Command::new("./vcpkg").args(["install", "libheif"]).status().unwrap(); + } } fn main() {