Files
allwpilib/cameraserver/build.gradle

69 lines
1.8 KiB
Groovy
Raw Normal View History

2018-04-29 13:29:07 -07:00
ext {
nativeName = 'cameraserver'
2025-11-07 20:00:38 -05:00
devMain = 'org.wpilib.cameraserver.DevMain'
2018-04-29 13:29:07 -07:00
}
evaluationDependsOn(':ntcore')
evaluationDependsOn(':cscore')
evaluationDependsOn(':hal')
apply from: "${rootDir}/shared/javacpp/setupBuild.gradle"
dependencies {
2019-11-12 17:14:04 -08:00
implementation project(':wpiutil')
implementation project(':wpinet')
2019-11-12 17:14:04 -08:00
implementation project(':ntcore')
implementation project(':cscore')
2018-04-29 13:29:07 -07:00
}
ext {
sharedCvConfigs = [cameraserver : [],
cameraserverBase: [],
cameraserverDev : [],
cameraserverTest: []]
2018-04-29 13:29:07 -07:00
staticCvConfigs = [:]
useJava = true
useCpp = true
}
apply from: "${rootDir}/shared/opencv.gradle"
nativeUtils.exportsConfigs {
cameraserver {
2018-04-29 13:29:07 -07:00
}
}
model {
2018-04-29 13:29:07 -07:00
components {}
binaries {
all {
if (!it.buildable || !(it instanceof NativeBinarySpec)) {
return
}
2022-10-08 10:01:31 -07:00
project(':ntcore').addNtcoreDependency(it, 'shared')
2018-04-29 13:29:07 -07:00
lib project: ':cscore', library: 'cscore', linkage: 'shared'
lib project: ':wpinet', library: 'wpinet', linkage: 'shared'
2018-04-29 13:29:07 -07:00
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
2018-04-29 13:29:07 -07:00
if (arch == systemArch) {
def filePath = it.tasks.install.installDirectory.get().toString() + File.separatorChar + 'lib'
found = true
}
}
}
}
}
}
}