Skip to content

Commit a1c71ea

Browse files
authored
Merge pull request #42 from marmistrz/master
Add support for the CMAKE environmental variable
2 parents d468b25 + cb6c4d6 commit a1c71ea

File tree

2 files changed

+5
-1
lines changed

2 files changed

+5
-1
lines changed

README.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,9 @@ library.
1313
cmake = "0.2"
1414
```
1515

16+
The CMake executable is assumed to be `cmake` unless the `CMAKE`
17+
environmental variable is set.
18+
1619
# License
1720

1821
This project is licensed under either of

src/lib.rs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -297,7 +297,8 @@ impl Config {
297297
let cmake_prefix_path = env::join_paths(&cmake_prefix_path).unwrap();
298298

299299
// Build up the first cmake command to build the build system.
300-
let mut cmd = Command::new("cmake");
300+
let executable = env::var("CMAKE").unwrap_or("cmake".to_owned());
301+
let mut cmd = Command::new(executable);
301302
cmd.arg(&self.path)
302303
.current_dir(&build);
303304
if target.contains("windows-gnu") {

0 commit comments

Comments
 (0)