File tree Expand file tree Collapse file tree 1 file changed +17
-3
lines changed
core/platform/android/libcocos2dx Expand file tree Collapse file tree 1 file changed +17
-3
lines changed Original file line number Diff line number Diff line change @@ -162,11 +162,25 @@ class axistools {
162
162
def sdkRoot = Paths . get(" ${ System.env.ANDROID_SDK} " )
163
163
164
164
if (Files . exists(sdkRoot)) {
165
+ def verList = []
166
+
167
+ // Scan installed cmake in $sdk_root/cmake
168
+ File sdkCMakeDir = new File (sdkRoot. toAbsolutePath(). toString() + ' /cmake' )
169
+ if (sdkCMakeDir. isDirectory()) {
170
+ for (cmakeDir in sdkCMakeDir. listFiles()) {
171
+ verList. add(cmakeDir. getName())
172
+ }
173
+ }
174
+
175
+ // Sort cmake verList
176
+ verList. sort {a ,b ->
177
+ return axistools. compareVersion(b, a)
178
+ }
179
+
180
+ // Collect cmakeBinDirs for search
165
181
sdkRoot = sdkRoot. toAbsolutePath(). toString()
166
- def verList = [" 3.10.2.4988404" , " 3.18.1" ]
167
182
for (foundVer in verList){
168
183
cmakeBinDir = sdkRoot + File . separator + " cmake" + File . separator + foundVer + File . separator + " bin"
169
-
170
184
if (new File (cmakeBinDir). isDirectory()) {
171
185
cmakeBinDirs. add(cmakeBinDir)
172
186
}
@@ -238,7 +252,7 @@ class axistools {
238
252
239
253
String ninjaPath = cmakeBin + File . separator + getNinjaProgramName()
240
254
if (! new File (ninjaPath). isFile()) {
241
- println (" The required ninja program is not present in cmake bin dir! " )
255
+ println (" The required ninja program is not present in cmake bin dir: ' $c makeBin ' " )
242
256
return null
243
257
}
244
258
You can’t perform that action at this time.
0 commit comments