Open jonatino opened 5 months ago
Did some more debugging and enabled some previously commented out dbg!
statements. Initially, I used the example from the README.md and I ran the cargo vcpkg build
command then after a few seconds Ctrl+C to cancel it. Then I switched the dependencies to the ones I want, but for some reason it seemed like my first example with the sdl2
from the README is still cached somehow in metadata? I've tried to delete Cargo.lock
file but it does not fix the issue.
Here is the print statement from https://github.com/mcgoo/cargo-vcpkg/blob/master/src/main.rs#L344
[src\main.rs:339:5] &metadata.workspace_metadata = Null
[src\main.rs:344:13] &v = Metadata {
vcpkg: Vcpkg {
target: {
"x86_64-pc-windows-msvc": Target {
triplet: Some(
"x64-windows-static-md",
),
dependencies: None,
dev_dependencies: None,
},
},
branch: None,
rev: Some(
"261c458af6e3eed5d099144aff95d2b5035f656b",
),
git: Some(
"https://github.com/microsoft/vcpkg",
),
tag: None,
dependencies: Some(
[
"sdl2",
],
),
dev_dependencies: Some(
[
"sdl2",
"sdl2-image[libjpeg-turbo,tiff,libwebp]",
"sdl2-ttf",
"sdl2-gfx",
"sdl2-mixer",
],
),
overlay_triplets_path: None,
build_type: None,
},
}
[src\main.rs:344:13] &v = Metadata {
vcpkg: Vcpkg {
target: {
"x86_64-pc-windows-msvc": Target {
triplet: Some(
"x64-windows-static",
),
dependencies: Some(
[
"opencv4[contrib,nonfree]",
],
),
dev_dependencies: None,
},
},
branch: None,
rev: Some(
"94a50e8",
),
git: Some(
"https://github.com/microsoft/vcpkg",
),
tag: None,
dependencies: None,
dev_dependencies: None,
overlay_triplets_path: None,
build_type: None,
},
}
The first print was the example I copied and I Ctrl+C'ed mid run and the second is the actual metadata from my project.
Hopefully that helps.
I'm just trying to get the opencv4 vcpkg.
But for some reason when running
cargo vcpkg build
, it always trys to install sdl2?