mirror of
https://github.com/wpilibsuite/allwpilib
synced 2026-06-22 01:11:42 +00:00
Did these in cscore and the other repos, but forgot about some of the oddities jenkins has.
70 lines
2.2 KiB
Groovy
70 lines
2.2 KiB
Groovy
import org.gradle.language.base.internal.ProjectLayout
|
|
|
|
if (!project.hasProperty('skipAthena')) {
|
|
apply plugin: 'cpp'
|
|
apply plugin: 'visual-studio'
|
|
apply plugin: 'edu.wpi.first.NativeUtils'
|
|
|
|
apply from: '../config.gradle'
|
|
|
|
ext.examplesMap = [:]
|
|
|
|
def tree = file("$projectDir/src")
|
|
tree.list().each {
|
|
examplesMap.put(it, [])
|
|
}
|
|
|
|
model {
|
|
dependencyConfigs {
|
|
wpiutil(DependencyConfig) {
|
|
groupId = 'edu.wpi.first.wpiutil'
|
|
artifactId = 'wpiutil-cpp'
|
|
headerClassifier = 'headers'
|
|
ext = 'zip'
|
|
version = '+'
|
|
sharedConfigs = examplesMap
|
|
}
|
|
ntcore(DependencyConfig) {
|
|
groupId = 'edu.wpi.first.ntcore'
|
|
artifactId = 'ntcore-cpp'
|
|
headerClassifier = 'headers'
|
|
ext = 'zip'
|
|
version = '+'
|
|
sharedConfigs = examplesMap
|
|
}
|
|
opencv(DependencyConfig) {
|
|
groupId = 'org.opencv'
|
|
artifactId = 'opencv-cpp'
|
|
headerClassifier = 'headers'
|
|
ext = 'zip'
|
|
version = '3.2.0'
|
|
sharedConfigs = examplesMap
|
|
}
|
|
cscore(DependencyConfig) {
|
|
groupId = 'edu.wpi.first.cscore'
|
|
artifactId = 'cscore-cpp'
|
|
headerClassifier = 'headers'
|
|
ext = 'zip'
|
|
version = '+'
|
|
sharedConfigs = examplesMap
|
|
}
|
|
}
|
|
|
|
components {
|
|
examplesMap.each {
|
|
"${it.key}"(NativeLibrarySpec) {
|
|
binaries.all { binary->
|
|
if (binary.targetPlatform.architecture.name == 'athena') {
|
|
project(':ni-libraries').addNiLibrariesToLinker(binary)
|
|
binary.lib project: ':hal', library: 'halAthena', linkage: 'shared'
|
|
binary.lib project: ':wpilibc', library: 'wpilibc', linkage: 'shared'
|
|
} else {
|
|
binary.buildable = false
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|