Skip to content

Commit

Permalink
Define CMAKE_SYSTEM_NAME when compiling for Linux (#136)
Browse files Browse the repository at this point in the history
  • Loading branch information
messense authored Dec 2, 2021
1 parent dca4a9d commit 71c41f0
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -637,6 +637,10 @@ impl Config {
cmd.arg("-DCMAKE_OSX_SYSROOT=/");
cmd.arg("-DCMAKE_OSX_DEPLOYMENT_TARGET=");
}
} else if target.contains("linux") {
if !self.defined("CMAKE_SYSTEM_NAME") {
cmd.arg("-DCMAKE_SYSTEM_NAME=Linux");
}
}
if let Some(ref generator) = generator {
cmd.arg("-G").arg(generator);
Expand Down

0 comments on commit 71c41f0

Please sign in to comment.