File tree Expand file tree Collapse file tree 1 file changed +7
-7
lines changed Expand file tree Collapse file tree 1 file changed +7
-7
lines changed Original file line number Diff line number Diff line change @@ -11,6 +11,11 @@ def options(opts):
11
11
"Target Android API level" ,
12
12
"21" ,
13
13
)
14
+ opts .Add (
15
+ "ndk_version" ,
16
+ "Fully qualified version of ndk to use for compilation." ,
17
+ "23.2.8568313" ,
18
+ )
14
19
opts .Add (
15
20
"ANDROID_HOME" ,
16
21
"Path to your Android SDK installation. By default, uses ANDROID_HOME from your defined environment variables." ,
@@ -22,14 +27,9 @@ def exists(env):
22
27
return get_android_ndk_root (env ) is not None
23
28
24
29
25
- # This must be kept in sync with the value in https://github.com/godotengine/godot/blob/master/platform/android/detect.py#L58.
26
- def get_ndk_version ():
27
- return "23.2.8568313"
28
-
29
-
30
30
def get_android_ndk_root (env ):
31
31
if env ["ANDROID_HOME" ]:
32
- return env ["ANDROID_HOME" ] + "/ndk/" + get_ndk_version ()
32
+ return env ["ANDROID_HOME" ] + "/ndk/" + env [ "ndk_version" ]
33
33
else :
34
34
return os .environ .get ("ANDROID_NDK_ROOT" )
35
35
@@ -68,7 +68,7 @@ def generate(env):
68
68
69
69
if not os .path .exists (toolchain ):
70
70
print ("ERROR: Could not find NDK toolchain at " + toolchain + "." )
71
- print ("Make sure NDK version " + get_ndk_version () + " is installed." )
71
+ print ("Make sure NDK version " + env [ "ndk_version" ] + " is installed." )
72
72
env .Exit (1 )
73
73
74
74
env .PrependENVPath ("PATH" , toolchain + "/bin" ) # This does nothing half of the time, but we'll put it here anyways
You can’t perform that action at this time.
0 commit comments