mirror of
https://github.com/wpilibsuite/allwpilib
synced 2026-06-19 00:41:43 +00:00
Putting an early exit if statement at the top instead of wrapping the whole file contents unbreaks unit test configs, as was discovered for SysId. It reduces nesting as well. Unused plugins were removed from the beginnings of files as well.
54 lines
1.9 KiB
Groovy
54 lines
1.9 KiB
Groovy
if (project.hasProperty('onlylinuxathena')) {
|
|
return;
|
|
}
|
|
|
|
description = "A plugin that creates a simulation gui"
|
|
|
|
ext {
|
|
pluginName = 'halsim_gui'
|
|
}
|
|
|
|
apply plugin: 'google-test-test-suite'
|
|
|
|
ext {
|
|
staticGtestConfigs = [:]
|
|
}
|
|
|
|
staticGtestConfigs["${pluginName}Test"] = []
|
|
apply from: "${rootDir}/shared/googletest.gradle"
|
|
|
|
apply from: "${rootDir}/shared/plugins/setupBuild.gradle"
|
|
|
|
|
|
apply from: "${rootDir}/shared/imgui.gradle"
|
|
|
|
model {
|
|
binaries {
|
|
all {
|
|
lib project: ':glass', library: 'glassnt', linkage: 'static'
|
|
lib project: ':glass', library: 'glass', linkage: 'static'
|
|
lib project: ':wpigui', library: 'wpigui', linkage: 'static'
|
|
lib project: ':wpimath', library: 'wpimath', linkage: 'shared'
|
|
project(':ntcore').addNtcoreDependency(it, 'shared')
|
|
lib project: ':wpinet', library: 'wpinet', linkage: 'shared'
|
|
lib project: ':wpiutil', library: 'wpiutil', linkage: 'shared'
|
|
lib project: ':fieldImages', library: 'fieldImages', linkage: 'static'
|
|
nativeUtils.useRequiredLibrary(it, 'imgui')
|
|
if (it.targetPlatform.name == nativeUtils.wpi.platforms.roborio) {
|
|
it.buildable = false
|
|
return
|
|
}
|
|
if (it.targetPlatform.operatingSystem.isWindows()) {
|
|
it.linker.args << 'Gdi32.lib' << 'Shell32.lib' << 'd3d11.lib' << 'd3dcompiler.lib'
|
|
} else if (it.targetPlatform.operatingSystem.isMacOsX()) {
|
|
it.linker.args << '-framework' << 'Metal' << '-framework' << 'MetalKit' << '-framework' << 'Cocoa' << '-framework' << 'IOKit' << '-framework' << 'CoreFoundation' << '-framework' << 'CoreVideo' << '-framework' << 'QuartzCore'
|
|
} else {
|
|
it.linker.args << '-lX11'
|
|
if (it.targetPlatform.name.startsWith('linuxarm')) {
|
|
it.linker.args << '-lGL'
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|