Skip to content

Commit

Permalink
add SDL2_gfx build.gradle
Browse files Browse the repository at this point in the history
  • Loading branch information
georgik committed Jun 6, 2018
1 parent 8a2dd36 commit 6916919
Showing 1 changed file with 52 additions and 0 deletions.
52 changes: 52 additions & 0 deletions SDL2_gfx/build.gradle
@@ -0,0 +1,52 @@
apply plugin: 'com.android.model.native'

def lib_distribution_root = '../distribution'
model {

android {
compileSdkVersion = gradle.sdkVersion
buildToolsVersion = gradle.buildToolsVersion

defaultConfig {
minSdkVersion.apiLevel = 13
targetSdkVersion.apiLevel = gradle.sdkVersion
versionCode = 1
versionName = '1.0'
}
ndk {
moduleName = 'SDL2_gfx'
ldLibs.addAll(["GLESv1_CM", "EGL", "GLESv2", "log", "android", "dl"])
CFlags.addAll(["-DGL_GLEXT_PROTOTYPES"])
CFlags.addAll(["-I" + file("include/").absolutePath,"-DGL_GLEXT_PROTOTYPES"])
}

sources {
main {
jni {
dependencies {
project ':SDL2' linkage 'shared'
}
exportedHeaders {
srcDir "../SDL2/include"
}
source {
srcDir "src"
}
}
}
}

}
}

// This is just copy out the header file and built lib into distribution
// directory for clint application to use; it is a small overhead of this sample:
// both lib and app are put inside one project space [save maintenance time]
task(distributeLib, type : Copy) {
// trigger build library
dependsOn assemble
into '../distribution/SDL2_gfx/'
from('build/outputs/native/release/lib') {
into 'lib/'
}
}

0 comments on commit 6916919

Please sign in to comment.