Fix find NDK on macOS

This commit is contained in:
世界 2023-02-02 16:30:50 +08:00
parent 4e22ac1a35
commit 9b6449dcf4
No known key found for this signature in database
GPG Key ID: CD109927C34A63C4
1 changed files with 2 additions and 1 deletions

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 {