Fix find NDK on macOS

This commit is contained in:
世界
2023-02-02 16:30:50 +08:00
parent 4e22ac1a35
commit 9b6449dcf4

View File

@@ -3,6 +3,7 @@ package main
import (
"os"
"path/filepath"
"runtime"
"sort"
"strconv"
"strings"
@@ -42,7 +43,7 @@ func findSDK() {
os.Setenv("ANDROID_SDK_HOME", androidSDKPath)
os.Setenv("ANDROID_NDK_HOME", androidNDKPath)
os.Setenv("NDK", androidNDKPath)
os.Setenv("PATH", os.Getenv("PATH")+":"+filepath.Join(androidNDKPath, "toolchains", "llvm", "prebuilt", "linux-x86_64", "bin"))
os.Setenv("PATH", os.Getenv("PATH")+":"+filepath.Join(androidNDKPath, "toolchains", "llvm", "prebuilt", runtime.GOOS+"-x86_64", "bin"))
}
func findNDK() bool {