Skip to content

Commit

Permalink
chore: don't use vcpkg for building dependencies.
Browse files Browse the repository at this point in the history
  • Loading branch information
plusvic committed Mar 13, 2024
1 parent 5966f6e commit 3c31922
Show file tree
Hide file tree
Showing 7 changed files with 3 additions and 30 deletions.
1 change: 0 additions & 1 deletion Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 1 addition & 2 deletions capi/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -18,5 +18,4 @@ crate-type = ["staticlib", "cdylib"]
yara-x = { workspace = true }

[build-dependencies]
cbindgen = { workspace = true }
vcpkg = { workspace = true }
cbindgen = { workspace = true }
5 changes: 0 additions & 5 deletions capi/build.rs
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
use std::env;
use vcpkg;

fn main() {
println!("cargo:rerun-if-changed=src");
Expand All @@ -8,10 +7,6 @@ fn main() {
let crate_dir = env::var("CARGO_MANIFEST_DIR").unwrap();
let output_file = "include/yara-x.h".to_owned();

vcpkg::find_package("libmagic").unwrap();
vcpkg::find_package("bzip2").unwrap();
vcpkg::find_package("zlib").unwrap();

match cbindgen::generate(crate_dir) {
Ok(header) => {
header.write_to_file(output_file);
Expand Down
9 changes: 0 additions & 9 deletions cli/build.rs

This file was deleted.

8 changes: 1 addition & 7 deletions lib/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -220,10 +220,4 @@ zip = "0.6.6"

[[bench]]
name = "benches"
harness = false


[package.metadata.vcpkg]
git = "https://github.com/microsoft/vcpkg"
rev = "fba75d0"
dependencies = ["bzip2", "zlib"]
harness = false
3 changes: 1 addition & 2 deletions py/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -21,5 +21,4 @@ yara-x = { workspace = true }
vcpkg = "0.2.15"

[build-dependencies]
pyo3-build-config = "0.19.2"
vcpkg = { workspace = true }
pyo3-build-config = "0.19.2"
4 changes: 0 additions & 4 deletions py/build.rs
Original file line number Diff line number Diff line change
@@ -1,7 +1,3 @@
fn main() {
vcpkg::find_package("libmagic").unwrap();
vcpkg::find_package("bzip2").unwrap();
vcpkg::find_package("zlib").unwrap();

pyo3_build_config::add_extension_module_link_args();
}

0 comments on commit 3c31922

Please sign in to comment.