Skip to content

Commit

Permalink
add heif check windows
Browse files Browse the repository at this point in the history
  • Loading branch information
woelper committed Nov 4, 2023
1 parent d594599 commit 8f06a2d
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 3 deletions.
8 changes: 5 additions & 3 deletions .github/workflows/check_windows.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
on: [push]

name: Windows Check no default features
name: Windows Check
jobs:
check:
strategy:
Expand Down Expand Up @@ -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
12 changes: 12 additions & 0 deletions build.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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() {
Expand Down

0 comments on commit 8f06a2d

Please sign in to comment.