Skip to content
Snippets Groups Projects
Commit a3c1f765 authored by Courtney Goeltzenleuchter's avatar Courtney Goeltzenleuchter
Browse files

Do not need Windows specific template anymore

clang compiler is now supported on Windows, so
no need for separate Windows template.
parent ba3f4c70
No related branches found
No related tags found
No related merge requests found
// this template is for windows platform to build
// need gcc, could not use clang
// disable -Werror compile flag
// This is temp workaround, clean fix will be provided soon so all OSes should use
// common.gradle
apply plugin: 'com.android.model.native'
Properties properties = new Properties()
properties.load(project.rootProject.file('local.properties').newDataInputStream())
def ndkDir = properties.getProperty('ndk.dir')
model {
android {
compileSdkVersion = 23
buildToolsVersion = "23.0.2"
defaultConfig.with {
minSdkVersion.apiLevel = 22
targetSdkVersion.apiLevel = 24
versionCode = 1
versionName = "0.0.1"
}
}
android.ndk {
moduleName = "VkLayer_${project.name}"
toolchain = "gcc"
stl = "gnustl_static"
ldLibs.addAll(["log", "android"])
cppFlags.addAll(["-std=c++11", "-DVK_PROTOTYPES", "-Wall",
"-Wno-unused-function", "-Wno-unused-const-variable",
"-DVK_USE_PLATFORM_ANDROID_KHR"])
cppFlags.addAll(["-I${file("../../../../layers")}".toString(),
"-I${file("../../../../include")}".toString(),
"-I${file("../../../../loader")}".toString(),
"-I${file("../../include")}".toString(),
"-I${file("../../../../external/glslang")}".toString()])
}
// Turn on hard float support in armeabi-v7a
android.abis {
create("armeabi-v7a") {
cppFlags.addAll(["-mhard-float", "-D_NDK_MATH_NO_SOFTFP=1", "-mfloat-abi=hard"])
ldLibs.add("m_hard")
ldFlags.add("-Wl,--no-warn-mismatch")
}
}
android.sources {
main {
jni {
source {
srcDir "../../layer-src/${project.name}"
srcDir '../../common'
}
}
}
}
android.buildTypes {
release {
ndk.with {
debuggable = true
}
minifyEnabled = false
}
}
android.productFlavors {
create ("all") {
ndk.abiFilters.addAll(["armeabi-v7a", 'arm64-v8a',
'x86', 'x86_64'])
}
}
}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment