Files
allwpilib/shared/opencv.gradle
Peter Johnson 561d53885e [build] Update opencv to 4.5.2, imgui/implot to latest (#3344)
Also update native-utils to 2022.0.0 to start pulling 2022 artifacts.
2021-05-10 18:59:14 -07:00

34 lines
1.2 KiB
Groovy

def opencvVersion = '4.5.2-1'
if (project.hasProperty('useCpp') && project.useCpp) {
model {
binaries {
withType(NativeBinarySpec).all {
def binary = it
project.sharedCvConfigs.each {
if (binary.component.name == it.key) {
nativeUtils.useRequiredLibrary(binary, 'opencv_shared')
}
}
project.staticCvConfigs.each {
if (binary.component.name == it.key) {
nativeUtils.useRequiredLibrary(binary, 'opencv_static')
}
}
}
}
}
}
if (project.hasProperty('useJava') && project.useJava) {
dependencies {
implementation "edu.wpi.first.thirdparty.frc2022.opencv:opencv-java:${opencvVersion}"
if (!project.hasProperty('skipDev') || !project.skipDev) {
devImplementation "edu.wpi.first.thirdparty.frc2022.opencv:opencv-java:${opencvVersion}"
}
if (project.hasProperty('useDocumentation') && project.useDocumentation) {
javaSource "edu.wpi.first.thirdparty.frc2022.opencv:opencv-java:${opencvVersion}:sources"
}
}
}