blob: 86151c112d268f720a8cad199f7debb0ff2b22b4 [file] [log] [blame]
Austin Schuh1e69f942020-11-14 15:06:14 -08001def opencvVersion = '3.4.7-5'
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 Schuh1e69f942020-11-14 15:06:14 -080025 implementation "edu.wpi.first.thirdparty.frc2021.opencv:opencv-java:${opencvVersion}"
Brian Silverman8fce7482020-01-05 13:18:21 -080026 if (!project.hasProperty('skipDev') || !project.skipDev) {
Austin Schuh1e69f942020-11-14 15:06:14 -080027 devImplementation "edu.wpi.first.thirdparty.frc2021.opencv:opencv-java:${opencvVersion}"
Brian Silverman8fce7482020-01-05 13:18:21 -080028 }
29 if (project.hasProperty('useDocumentation') && project.useDocumentation) {
Austin Schuh1e69f942020-11-14 15:06:14 -080030 javaSource "edu.wpi.first.thirdparty.frc2021.opencv:opencv-java:${opencvVersion}:sources"
Brian Silverman8fce7482020-01-05 13:18:21 -080031 }
32 }
33}