Better auto detection for android deps

This commit is contained in:
Matthias Fulz 2020-08-24 23:22:51 +02:00
parent 437b2d577d
commit f0afd6e514
2 changed files with 15 additions and 0 deletions

View file

@ -858,6 +858,11 @@ extern "C" int32_t __isPlatformVersionAtLeast(int32_t Platform, int32_t Major, i
old() old()
} }
} }
if target == "android" || target == "android-emulator" {
utils.ADD_ANDROID_MODULES_INCLUDE(strings.TrimPrefix(module, "Qt"))
}
} }
} }

View file

@ -148,3 +148,13 @@ func ANDROID_EXTRA_LIBS() string {
func ANDROID_MODULES_INCLUDE() string { func ANDROID_MODULES_INCLUDE() string {
return os.Getenv("ANDROID_MODULES_INCLUDE") return os.Getenv("ANDROID_MODULES_INCLUDE")
} }
func ADD_ANDROID_MODULES_INCLUDE(module string) {
val := os.Getenv("ANDROID_MODULES_INCLUDE")
mod := module
if val != "" {
mod = "," + mod
}
os.Setenv("ANDROID_MODULES_INCLUDE", val+mod)
}