Adds wpiUtil to HAL and JNI (#280)

This commit is contained in:
Thad House
2016-10-23 09:51:30 -07:00
committed by Peter Johnson
parent f2751db5c2
commit c46c490376
2 changed files with 8 additions and 2 deletions

View File

@@ -4,6 +4,8 @@
apply plugin: 'cpp'
defineWpiUtilProperties()
model {
components {
HALAthena(NativeLibrarySpec) {
@@ -11,6 +13,7 @@ model {
binaries.all {
tasks.withType(CppCompile) {
addNiLibraryLinks(linker, targetPlatform)
addWpiUtilLibraryLinks(it, linker, targetPlatform)
}
}
sources {
@@ -20,7 +23,7 @@ model {
includes = ["**/*.cpp"]
}
exportedHeaders {
srcDirs = ["include", "lib/athena/FRC_FPGA_ChipObject"]
srcDirs = ["include", "lib/athena/FRC_FPGA_ChipObject", wpiUtilInclude]
}
}
}

View File

@@ -14,6 +14,8 @@ dependencies {
athenaRuntime 'edu.wpi.first.wpilib.networktables.java:NetworkTables:+:arm'
}
defineWpiUtilProperties()
// Configuration for the HAL bindings
model {
components {
@@ -23,6 +25,7 @@ model {
tasks.withType(CppCompile) {
dependsOn jniHeaders
addNiLibraryLinks(linker, targetPlatform)
addWpiUtilLibraryLinks(it, linker, targetPlatform)
}
}
sources {
@@ -35,7 +38,7 @@ model {
// JDK is included for jni.h. We also need the arm-linux specific headers. This does not need to change
// when compiling on Windows
// The JNI headers are put into the build/include directory by the jniHeaders task on wpilibJavaDevices
srcDirs = ["$jniDir/include", "$jniDir/include/linux"]
srcDirs = ["$jniDir/include", "$jniDir/include/linux", wpiUtilInclude]
jniHeaders.outputs.files.each { file ->
srcDirs file.getPath()
}