Skip to content

Commit c4febd0

Browse files
committed
Fix cross compilation on android armv7 and x86
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
1 parent c4a60dd commit c4febd0

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

src/lib.rs

+2
Original file line numberDiff line numberDiff line change
@@ -458,6 +458,8 @@ impl Config {
458458
// CMAKE_SYSTEM_PROCESSOR
459459
// some of the values come from https://en.wikipedia.org/wiki/Uname
460460
let (system_name, system_processor) = match (os.as_str(), arch.as_str()) {
461+
("android", "arm") => ("Android", "armv7-a"),
462+
("android", "x86") => ("Android", "i686"),
461463
("android", arch) => ("Android", arch),
462464
("dragonfly", arch) => ("DragonFly", arch),
463465
("macos", "x86_64") => ("Darwin", "x86_64"),

0 commit comments

Comments
 (0)