Revert "Fixes for Android (ndk r26b)"

This commit is contained in:
RustDesk
2023-11-02 09:50:02 +08:00
committed by GitHub
parent faf99ffe14
commit 9096c29fef
2 changed files with 46 additions and 75 deletions

View File

@@ -41,7 +41,7 @@ fn build_manifest() {
}
}
fn install_android_deps() {
fn install_oboe() {
let target_os = std::env::var("CARGO_CFG_TARGET_OS").unwrap();
if target_os != "android" {
return;
@@ -49,8 +49,6 @@ fn install_android_deps() {
let mut target_arch = std::env::var("CARGO_CFG_TARGET_ARCH").unwrap();
if target_arch == "x86_64" {
target_arch = "x64".to_owned();
} else if target_arch == "x86" {
target_arch = "x86".to_owned();
} else if target_arch == "aarch64" {
target_arch = "arm64".to_owned();
} else {
@@ -68,7 +66,6 @@ fn install_android_deps() {
path.join("lib").to_str().unwrap()
)
);
println!("cargo:rustc-link-lib=ndk_compat");
println!("cargo:rustc-link-lib=oboe");
println!("cargo:rustc-link-lib=c++");
println!("cargo:rustc-link-lib=OpenSLES");
@@ -81,7 +78,7 @@ fn install_android_deps() {
fn main() {
hbb_common::gen_version();
install_android_deps();
install_oboe();
// there is problem with cfg(target_os) in build.rs, so use our workaround
// let target_os = std::env::var("CARGO_CFG_TARGET_OS").unwrap();
// if target_os == "android" || target_os == "ios" {