mirror of
https://github.com/wpilibsuite/allwpilib
synced 2026-06-22 01:11:42 +00:00
78 lines
2.6 KiB
Groovy
78 lines
2.6 KiB
Groovy
ext {
|
|
nativeName = 'cameraserver'
|
|
devMain = 'edu.wpi.first.cameraserver.DevMain'
|
|
}
|
|
|
|
evaluationDependsOn(':ntcore')
|
|
evaluationDependsOn(':cscore')
|
|
evaluationDependsOn(':hal')
|
|
|
|
apply from: "${rootDir}/shared/javacpp/setupBuild.gradle"
|
|
|
|
dependencies {
|
|
implementation project(':wpiutil')
|
|
implementation project(':ntcore')
|
|
implementation project(':cscore')
|
|
devImplementation project(':wpiutil')
|
|
devImplementation project(':ntcore')
|
|
devImplementation project(':cscore')
|
|
}
|
|
|
|
ext {
|
|
sharedCvConfigs = [cameraserver : [],
|
|
cameraserverBase: [],
|
|
cameraserverDev : [],
|
|
cameraserverTest: []]
|
|
staticCvConfigs = [:]
|
|
useJava = true
|
|
useCpp = true
|
|
}
|
|
|
|
apply from: "${rootDir}/shared/opencv.gradle"
|
|
|
|
nativeUtils.exportsConfigs {
|
|
cameraserver {
|
|
x86ExcludeSymbols = ['_CT??_R0?AV_System_error', '_CT??_R0?AVexception', '_CT??_R0?AVfailure',
|
|
'_CT??_R0?AVruntime_error', '_CT??_R0?AVsystem_error', '_CTA5?AVfailure',
|
|
'_TI5?AVfailure', '_CT??_R0?AVout_of_range', '_CTA3?AVout_of_range',
|
|
'_TI3?AVout_of_range', '_CT??_R0?AVbad_cast']
|
|
x64ExcludeSymbols = ['_CT??_R0?AV_System_error', '_CT??_R0?AVexception', '_CT??_R0?AVfailure',
|
|
'_CT??_R0?AVruntime_error', '_CT??_R0?AVsystem_error', '_CTA5?AVfailure',
|
|
'_TI5?AVfailure', '_CT??_R0?AVout_of_range', '_CTA3?AVout_of_range',
|
|
'_TI3?AVout_of_range', '_CT??_R0?AVbad_cast']
|
|
}
|
|
}
|
|
|
|
model {
|
|
components {}
|
|
binaries {
|
|
all {
|
|
if (!it.buildable || !(it instanceof NativeBinarySpec)) {
|
|
return
|
|
}
|
|
lib project: ':ntcore', library: 'ntcore', linkage: 'shared'
|
|
lib project: ':cscore', library: 'cscore', linkage: 'shared'
|
|
lib project: ':wpiutil', library: 'wpiutil', linkage: 'shared'
|
|
}
|
|
}
|
|
tasks {
|
|
def c = $.components
|
|
def found = false
|
|
def systemArch = getCurrentArch()
|
|
c.each {
|
|
if (it in NativeExecutableSpec && it.name == "${nativeName}Dev") {
|
|
it.binaries.each {
|
|
if (!found) {
|
|
def arch = it.targetPlatform.name
|
|
if (arch == systemArch) {
|
|
def filePath = it.tasks.install.installDirectory.get().toString() + File.separatorChar + 'lib'
|
|
|
|
found = true
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|