This is exactly my painpoint with C++ too. With Rust and such I'm one simple command line call away from installing a dependency. With C++ every dependency is a battle.
https://doc.rust-lang.org/cargo/commands/cargo-tree.html
Download all dependencies locally:
> I could then go to an internet facing machine and run a cargo command
Copy over your Cargo.toml to that machine, run vendor, copy the vendor files back.
It integrates with cmake too!