blob: ca3764d2d6434274e3c278d4aa1334104faebef0 [file] [log] [blame]
Brian Silverman8fce7482020-01-05 13:18:21 -08001def opencvVersion = '3.4.7-2'
2
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 {
25 implementation "edu.wpi.first.thirdparty.frc2020.opencv:opencv-java:${opencvVersion}"
26 if (!project.hasProperty('skipDev') || !project.skipDev) {
27 devImplementation "edu.wpi.first.thirdparty.frc2020.opencv:opencv-java:${opencvVersion}"
28 }
29 if (project.hasProperty('useDocumentation') && project.useDocumentation) {
30 javaSource "edu.wpi.first.thirdparty.frc2020.opencv:opencv-java:${opencvVersion}:sources"
31 }
32 }
33}