Output messages to the log every 30 seconds when building MoltenVK

This commit is contained in:
Maik Klein 2019-06-24 09:50:12 +02:00
parent 728d5e5f59
commit f7a98644fc
2 changed files with 7 additions and 3 deletions

View file

@ -36,10 +36,14 @@ fn main() {
} }
// The 'external' feature was not enabled. Molten will be built automaticaly. // The 'external' feature was not enabled. Molten will be built automaticaly.
if !is_external_enabled() { if !is_external_enabled() {
std::process::Command::new("bash") let mut build = std::process::Command::new("bash")
.arg("build_molten.sh") .arg("build_molten.sh")
.status() .spawn()
.expect("Unable to build molten"); .expect("Unable to build molten");
while build.try_wait().unwrap().is_none() {
println!("Still building MoltenVK");
std::thread::sleep(std::time::Duration::from_secs(30));
}
let project_dir = let project_dir =
PathBuf::from(std::env::var("CARGO_MANIFEST_DIR").unwrap()).join("native"); PathBuf::from(std::env::var("CARGO_MANIFEST_DIR").unwrap()).join("native");
println!("cargo:rustc-link-search=native={}", project_dir.display()); println!("cargo:rustc-link-search=native={}", project_dir.display());

View file

@ -1,5 +1,5 @@
git clone https://github.com/KhronosGroup/MoltenVK.git git clone https://github.com/KhronosGroup/MoltenVK.git
cd MoltenVK cd MoltenVK
sh fetchDependencies sh fetchDependencies
xcodebuild -project "$(XCODE_PROJ)" -scheme "$(XCODE_SCHEME_BASE) (macOS only)" make macos
cp Package/Release/MoltenVK/macOS/static/libMoltenVK.a ../native cp Package/Release/MoltenVK/macOS/static/libMoltenVK.a ../native