mirror of https://github.com/axmolengine/axmol.git
Update adxetools.gradle
This commit is contained in:
parent
2bc22e1bd1
commit
8270c4f5dd
|
@ -236,23 +236,10 @@ class adxetools {
|
||||||
static String findCMakeFromBinDir(String cmakeVer, String cmakeBin, boolean allowNewerCMake) {
|
static String findCMakeFromBinDir(String cmakeVer, String cmakeBin, boolean allowNewerCMake) {
|
||||||
def foundCMakeVer = null
|
def foundCMakeVer = null
|
||||||
|
|
||||||
String ninjaName = isWindows() ? "ninja.exe" : "ninja"
|
String ninjaPath = cmakeBin + File.separator + isWindows() ? "ninja.exe" : "ninja"
|
||||||
String ninjaPath = cmakeBin + File.separator + ninjaName
|
|
||||||
if(!new File(ninjaPath).isFile()) {
|
if(!new File(ninjaPath).isFile()) {
|
||||||
// check whether ninja in other location and in path
|
println("The required ninja program is not present in cmake bin dir!")
|
||||||
def ninjaInstalled = false
|
return null
|
||||||
try {
|
|
||||||
Process proc = Runtime.getRuntime().exec("ninja --version")
|
|
||||||
proc.waitFor()
|
|
||||||
|
|
||||||
int exitVal = proc.exitValue()
|
|
||||||
ninjaInstalled = exitVal == 0
|
|
||||||
} catch(Exception) {
|
|
||||||
}
|
|
||||||
|
|
||||||
if (!ninjaInstalled) {
|
|
||||||
throw new GradleException("Required $ninjaPath exists!")
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
try {
|
try {
|
||||||
|
|
Loading…
Reference in New Issue