mirror of
https://github.com/rustdesk/rustdesk.git
synced 2025-05-10 18:06:01 +02:00
Check LLVM_HOME when build
This commit is contained in:
parent
a2763c2d6f
commit
c3fe407d5c
1 changed files with 14 additions and 8 deletions
22
build.rs
22
build.rs
|
@ -78,18 +78,24 @@ fn install_oboe() {
|
|||
|
||||
fn gen_flutter_rust_bridge() {
|
||||
// Get dependent of flutter
|
||||
if !std::path::Path::new("./flutter/.packages").exists(){
|
||||
if !std::path::Path::new("./flutter/.packages").exists() {
|
||||
std::process::Command::new("flutter")
|
||||
.args(["pub", "get"])
|
||||
.current_dir("./flutter")
|
||||
.output()
|
||||
.expect("failed to execute flutter pub get");
|
||||
.args(["pub", "get"])
|
||||
.current_dir("./flutter")
|
||||
.output()
|
||||
.expect("failed to execute flutter pub get");
|
||||
};
|
||||
|
||||
let llvm_path = match std::env::var("LLVM_HOME") {
|
||||
Ok(path) => Some(vec![path]),
|
||||
Err(_) => None,
|
||||
Ok(path) => {
|
||||
if !path.is_empty() {
|
||||
Some(vec![path])
|
||||
} else {
|
||||
panic!("Missing LVM_HOME environment variable");
|
||||
}
|
||||
}
|
||||
Err(_) => panic!("Failure to get environments"),
|
||||
};
|
||||
|
||||
// Tell Cargo that if the given file changes, to rerun this build script.
|
||||
println!("cargo:rerun-if-changed=src/flutter_ffi.rs");
|
||||
// settings for fbr_codegen
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue