Files
allwpilib/shared/opencv.gradle
Peter Johnson 1f45732700 [build] Update to 2023.2.4 native-utils and new dependencies (#4473)
* Disable class-memaccess warning in Eigen
* Shim NiFpga_OpenHostMemoryBuffer
* Don't deploy .debug files in integration tests
2022-10-14 23:36:47 -07:00

34 lines
1.2 KiB
Groovy

def opencvVersion = '4.6.0-2'
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.frc2023.opencv:opencv-java:${opencvVersion}"
if (!project.hasProperty('skipDev') || !project.skipDev) {
devImplementation "edu.wpi.first.thirdparty.frc2023.opencv:opencv-java:${opencvVersion}"
}
if (project.hasProperty('useDocumentation') && project.useDocumentation) {
javaSource "edu.wpi.first.thirdparty.frc2023.opencv:opencv-java:${opencvVersion}:sources"
}
}
}