blob: 40d3c34a091de1afc7f89130b56e5f532c49b488 [file] [log] [blame]
James Kuszmaulcf324122023-01-14 14:07:17 -08001def opencvVersion = '4.6.0-2'
Brian Silverman8fce7482020-01-05 13:18:21 -08002
3if (project.hasProperty('useCpp') && project.useCpp) {
4 model {
5 binaries {
6 withType(NativeBinarySpec).all {
7 def binary = it
8 project.sharedCvConfigs.each {
9 if (binary.component.name == it.key) {
10 nativeUtils.useRequiredLibrary(binary, 'opencv_shared')
11 }
12 }
13 project.staticCvConfigs.each {
14 if (binary.component.name == it.key) {
15 nativeUtils.useRequiredLibrary(binary, 'opencv_static')
16 }
17 }
18 }
19 }
20 }
21}
22
23if (project.hasProperty('useJava') && project.useJava) {
24 dependencies {
James Kuszmaulcf324122023-01-14 14:07:17 -080025 implementation "edu.wpi.first.thirdparty.frc2023.opencv:opencv-java:${opencvVersion}"
Brian Silverman8fce7482020-01-05 13:18:21 -080026 if (!project.hasProperty('skipDev') || !project.skipDev) {
James Kuszmaulcf324122023-01-14 14:07:17 -080027 devImplementation "edu.wpi.first.thirdparty.frc2023.opencv:opencv-java:${opencvVersion}"
Brian Silverman8fce7482020-01-05 13:18:21 -080028 }
29 if (project.hasProperty('useDocumentation') && project.useDocumentation) {
James Kuszmaulcf324122023-01-14 14:07:17 -080030 javaSource "edu.wpi.first.thirdparty.frc2023.opencv:opencv-java:${opencvVersion}:sources"
Brian Silverman8fce7482020-01-05 13:18:21 -080031 }
32 }
33}