Files
allwpilib/wpilibc-examples/build.gradle
Thad House e1195e8b9d Update to 2018_v4 image and new build system. (#598)
* Revert "Force OpenCV to 3.1.0 (#602)"

This reverts commit 50ed55e8e2.

* Removes Simulation

* Removes old build system

* Removes old gtest

* Adds new gmock and gtest

* Updates to new ni-libraries

* removes MyRobot (to be replaced)

* moves files to new location

* Adds new sim backend and new test executables

* updates .styleguide and .gitignore

* Changes cpp WPILibVersion to a function

MSVC throws an AV with the old version.

* Disables USBCamera on all systems except for linux

* 2018 NI Libraries

* New build system
2017-08-18 21:35:53 -07:00

68 lines
1.9 KiB
Groovy

import org.gradle.language.base.internal.ProjectLayout
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
}
}
}
}
}
}