blob: ef7715d4a6a83cc00dbafd6d370d66a68d2730d2 [file] [log] [blame]
Austin Schuh812d0d12021-11-04 20:16:48 -07001def opencvVersion = '4.5.2-1'
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 {
Austin Schuh812d0d12021-11-04 20:16:48 -070025 implementation "edu.wpi.first.thirdparty.frc2022.opencv:opencv-java:${opencvVersion}"
Brian Silverman8fce7482020-01-05 13:18:21 -080026 if (!project.hasProperty('skipDev') || !project.skipDev) {
Austin Schuh812d0d12021-11-04 20:16:48 -070027 devImplementation "edu.wpi.first.thirdparty.frc2022.opencv:opencv-java:${opencvVersion}"
Brian Silverman8fce7482020-01-05 13:18:21 -080028 }
29 if (project.hasProperty('useDocumentation') && project.useDocumentation) {
Austin Schuh812d0d12021-11-04 20:16:48 -070030 javaSource "edu.wpi.first.thirdparty.frc2022.opencv:opencv-java:${opencvVersion}:sources"
Brian Silverman8fce7482020-01-05 13:18:21 -080031 }
32 }
33}