Austin Schuh | 812d0d1 | 2021-11-04 20:16:48 -0700 | [diff] [blame] | 1 | def opencvVersion = '4.5.2-1' |
Brian Silverman | 8fce748 | 2020-01-05 13:18:21 -0800 | [diff] [blame] | 2 | |
| 3 | if (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 | |
| 23 | if (project.hasProperty('useJava') && project.useJava) { |
| 24 | dependencies { |
Austin Schuh | 812d0d1 | 2021-11-04 20:16:48 -0700 | [diff] [blame] | 25 | implementation "edu.wpi.first.thirdparty.frc2022.opencv:opencv-java:${opencvVersion}" |
Brian Silverman | 8fce748 | 2020-01-05 13:18:21 -0800 | [diff] [blame] | 26 | if (!project.hasProperty('skipDev') || !project.skipDev) { |
Austin Schuh | 812d0d1 | 2021-11-04 20:16:48 -0700 | [diff] [blame] | 27 | devImplementation "edu.wpi.first.thirdparty.frc2022.opencv:opencv-java:${opencvVersion}" |
Brian Silverman | 8fce748 | 2020-01-05 13:18:21 -0800 | [diff] [blame] | 28 | } |
| 29 | if (project.hasProperty('useDocumentation') && project.useDocumentation) { |
Austin Schuh | 812d0d1 | 2021-11-04 20:16:48 -0700 | [diff] [blame] | 30 | javaSource "edu.wpi.first.thirdparty.frc2022.opencv:opencv-java:${opencvVersion}:sources" |
Brian Silverman | 8fce748 | 2020-01-05 13:18:21 -0800 | [diff] [blame] | 31 | } |
| 32 | } |
| 33 | } |