Skip to content

Commit

Permalink
Fix cross compilation on android armv7 and x86
Browse files Browse the repository at this point in the history
This fixes the following cmake errors

```
Android: Unknown processor CMAKE_SYSTEM_PROCESSOR='x86'.
```
and

```
Android: Unknown processor CMAKE_SYSTEM_PROCESSOR='arm'.
```

when crosscompiling for `i686-linux-android` and `armv7-linux-androideabi`
 android targets

fixes #175
  • Loading branch information
fredszaq committed Oct 3, 2023
1 parent c4a60dd commit c4febd0
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -458,6 +458,8 @@ impl Config {
// CMAKE_SYSTEM_PROCESSOR
// some of the values come from https://en.wikipedia.org/wiki/Uname
let (system_name, system_processor) = match (os.as_str(), arch.as_str()) {
("android", "arm") => ("Android", "armv7-a"),
("android", "x86") => ("Android", "i686"),
("android", arch) => ("Android", arch),
("dragonfly", arch) => ("DragonFly", arch),
("macos", "x86_64") => ("Darwin", "x86_64"),
Expand Down

0 comments on commit c4febd0

Please sign in to comment.