Files
allwpilib/wpilibc/simulation.gradle
Peter_Mitrano 0d062fba3a Add Cmake wrappers and unzip desktop ntcore builds
the task allcsim will build everything
requires ntcore desktop to be built
also fixed Driverstation to match non-sim C++ API

Conflicts:
	wpilibc/simulation/CMakeLists.txt

Change-Id: Id38141a5b48ed7fe064c7e6c8d2f618481b7e298
2015-12-18 22:29:57 -05:00

55 lines
1.4 KiB
Groovy

import org.apache.tools.ant.taskdefs.condition.Os
if (project.hasProperty('makeSim')){
//cmake wrapper tasks
task setupCmake(type: Exec) {
workingDir '..'
commandLine 'mkdir', '-p', 'build'
}
task cmake(type: Exec, dependsOn: setupCmake) {
workingDir '../build'
if (Os.isFamily(Os.FAMILY_WINDOWS)) {
commandLine '../configure.bat', "-DNTCORE_INCLUDE_DIR=$netTablesInclude","-DNTCORE_LIBDIR=$netLibDesktopLocation"
}
else {
commandLine 'cmake', '..', "-DNTCORE_INCLUDE_DIR=$netTablesInclude","-DNTCORE_LIBDIR=$netLibDesktopLocation"
}
}
task frc_gazebo_plugins(type: Exec, dependsOn: cmake) {
workingDir '../build'
if (Os.isFamily(Os.FAMILY_WINDOWS)) {
comanndLine 'nmake', 'frc_gazebo_plugins'
}
else {
commandLine 'make', 'frc_gazebo_plugins'
}
}
task gz_msgs(type: Exec, dependsOn: cmake) {
workingDir '../build'
if (Os.isFamily(Os.FAMILY_WINDOWS)) {
commandLine 'nmake', 'gz_msgs'
}
else {
commandLine 'make', 'gz_msgs'
}
}
task wpilibcSim(type: Exec, dependsOn: ['cmake', ':unzipNetworkTables']) {
workingDir '../build'
if (Os.isFamily(Os.FAMILY_WINDOWS)) {
commandLine 'nmake', 'wpilibcSim'
}
else {
commandLine 'make', 'wpilibcSim'
}
}
task allcsim(dependsOn: [wpilibcSim, gz_msgs, frc_gazebo_plugins]){
}
build.dependsOn allcsim
}