Updated STB image build script
This commit is contained in:
parent
883ff7da71
commit
e1a3d2e79f
@ -1,6 +1,6 @@
|
|||||||
// stb_image url for download
|
// stb_image url for download
|
||||||
String stbiUrl = 'http://www.nothings.org/stb_image.c'
|
String stbiUrl = 'https://raw.githubusercontent.com/nothings/stb/master/stb_image.h'
|
||||||
String stbiDownloadTarget = 'stb_image.c'
|
String stbiDownloadTarget = 'stb_image.h'
|
||||||
|
|
||||||
// stb_image is not downloaded. The single source file is included in the repo
|
// stb_image is not downloaded. The single source file is included in the repo
|
||||||
String stbiFolder = 'stb_image'
|
String stbiFolder = 'stb_image'
|
||||||
@ -63,20 +63,21 @@ task generateStbiHeaders(dependsOn: copyStbiJmeFiles) << {
|
|||||||
// println "stb_image destDir = " + destDir
|
// println "stb_image destDir = " + destDir
|
||||||
// println "stb_image classpath = " + project.projectClassPath
|
// println "stb_image classpath = " + project.projectClassPath
|
||||||
|
|
||||||
ant.javah(
|
exec {
|
||||||
classpath: project.projectClassPath,
|
executable org.gradle.internal.jvm.Jvm.current().getExecutable('javah')
|
||||||
destdir: destDirPath,
|
args '-d', destDirPath
|
||||||
class: classes
|
args '-classpath', project.projectClassPath
|
||||||
)
|
args "com.jme3.texture.plugins.AndroidNativeImageLoader"
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
task buildStbiNativeLib(type: Exec, dependsOn: generateStbiHeaders) {
|
task buildStbiNativeLib(type: Exec, dependsOn: generateStbiHeaders) {
|
||||||
// println "stb_image build dir: " + buildLibDir
|
// println "stb_image build dir: " + stbiBuildDir
|
||||||
// println "ndkCommandPath: " + project.ndkCommandPath
|
// println "ndkCommandPath: " + rootProject.ndkCommandPath
|
||||||
args 'TARGET_PLATFORM=android-9'
|
|
||||||
workingDir stbiBuildDir
|
workingDir stbiBuildDir
|
||||||
executable rootProject.ndkCommandPath
|
executable rootProject.ndkCommandPath
|
||||||
|
args '-j8'
|
||||||
}
|
}
|
||||||
|
|
||||||
task updatePreCompiledStbiLibs(type: Copy, dependsOn: buildStbiNativeLib) {
|
task updatePreCompiledStbiLibs(type: Copy, dependsOn: buildStbiNativeLib) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user