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
This commit is contained in:
Peter_Mitrano
2015-11-29 21:12:12 -05:00
parent 9316933454
commit 0d062fba3a
7 changed files with 108 additions and 75 deletions

View File

@@ -19,11 +19,20 @@ niLibraryTree.each { lib ->
}
}
def ntDependency =
def armNtDependency =
project.dependencies.create("edu.wpi.first.wpilib.networktables.cpp:NetworkTables:3.0.0-SNAPSHOT:arm@zip")
def config = project.configurations.detachedConfiguration(ntDependency)
config.setTransitive(false)
def netTables = config.files[0].canonicalFile
def armConfig = project.configurations.detachedConfiguration(armNtDependency)
armConfig.setTransitive(false)
def armNetTables = armConfig.files[0].canonicalFile
def desktopNetTables
if (project.hasProperty('makeSim')){
def desktopNtDependency =
project.dependencies.create("edu.wpi.first.wpilib.networktables.cpp:NetworkTables:3.0.0-SNAPSHOT:desktop@zip")
def desktopConfig = project.configurations.detachedConfiguration(desktopNtDependency)
desktopConfig.setTransitive(false)
desktopNetTables = desktopConfig.files[0].canonicalFile
}
def netTablesUnzipLocation = "$buildDir/networktables"
@@ -31,7 +40,10 @@ def netTablesUnzipLocation = "$buildDir/networktables"
task unzipNetworkTables(type: Copy) {
description = 'Unzips the networktables maven dependency so that the include files and libraries can be used'
group = 'WPILib'
from zipTree(netTables)
if (project.hasProperty('makeSim')){
from zipTree(desktopNetTables)
}
from zipTree(armNetTables)
into netTablesUnzipLocation
}
@@ -47,9 +59,12 @@ subprojects {
ext.defineNetworkTablesProperties = {
ext.netTables = netTablesUnzipLocation
ext.netTablesInclude = "$netTablesUnzipLocation/include"
ext.netLibLocation = "$netTablesUnzipLocation/Linux/arm"
ext.netSharedLib = "$netLibLocation/libntcore.so"
ext.netStaticLib = "$netLibLocation/libntcore.a"
ext.netLibArmLocation = "$netTablesUnzipLocation/Linux/arm"
if (project.hasProperty('makeSim')){
ext.netLibDesktopLocation = "$netTablesUnzipLocation/Linux/amd64"
}
ext.netSharedLib = "$netLibArmLocation/libntcore.so"
ext.netStaticLib = "$netLibArmLocation/libntcore.a"
task addNetworkTablesLibraryLinks() {
description = 'Adds the linker flags for the networktables libraries retreived from maven'