make sure the user has CMake installed
Signed-off-by: r3g_5z <june@girlboss.ceo>
This commit is contained in:
parent
c557529e5b
commit
e475c85234
2 changed files with 14 additions and 4 deletions
|
|
@ -37,3 +37,11 @@ rustflags = "-lc++ -l framework=Accelerate"
|
|||
```
|
||||
|
||||
See https://github.com/tazz4843/whisper-rs/pull/2 for more information.
|
||||
|
||||
You also need to have CMake installed. You can obtain this using homebrew:
|
||||
|
||||
```
|
||||
brew install cmake
|
||||
```
|
||||
|
||||
CMake can also be installed from https://cmake.org/download/ but `cmake` binary needs to be in your PATH.
|
||||
10
sys/build.rs
10
sys/build.rs
|
|
@ -104,9 +104,11 @@ fn main() {
|
|||
#[cfg(feature = "opencl")]
|
||||
cmd.arg("-DWHISPER_CLBLAST=ON");
|
||||
|
||||
let code = cmd.status().expect("Failed to run `cmake`");
|
||||
let code = cmd
|
||||
.status()
|
||||
.expect("Failed to run `cmake` (is CMake installed?)");
|
||||
if code.code() != Some(0) {
|
||||
panic!("Failed to run `cmake`");
|
||||
panic!("Failed to run `cmake` (is CMake installed?)");
|
||||
}
|
||||
|
||||
let code = std::process::Command::new("cmake")
|
||||
|
|
@ -115,9 +117,9 @@ fn main() {
|
|||
.arg("--config")
|
||||
.arg("Release")
|
||||
.status()
|
||||
.expect("Failed to build libwhisper.a");
|
||||
.expect("Failed to build libwhisper.a (is CMake installed?)");
|
||||
if code.code() != Some(0) {
|
||||
panic!("Failed to build libwhisper.a");
|
||||
panic!("Failed to build libwhisper.a (is CMake installed?)");
|
||||
}
|
||||
|
||||
// move libwhisper.a to where Cargo expects it (OUT_DIR)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue