Skip to content

Commit f84bd51

Browse files
authored
Fix cross compilation on android armv7 and x86 (#186)
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 fa0a83d commit f84bd51

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
@@ -457,6 +457,8 @@ impl Config {
457457
// CMAKE_SYSTEM_PROCESSOR
458458
// some of the values come from https://en.wikipedia.org/wiki/Uname
459459
let (system_name, system_processor) = match (os.as_str(), arch.as_str()) {
460+
("android", "arm") => ("Android", "armv7-a"),
461+
("android", "x86") => ("Android", "i686"),
460462
("android", arch) => ("Android", arch),
461463
("dragonfly", arch) => ("DragonFly", arch),
462464
("macos", "aarch64") => ("Darwin", "arm64"),

0 commit comments

Comments
 (0)