mirror of
https://github.com/wpilibsuite/allwpilib
synced 2026-06-19 00:41:43 +00:00
With fixes to Windows and macOS library path handling, all the tricks we used in the past to make library loading work are no longer required.
34 lines
1.2 KiB
Groovy
34 lines
1.2 KiB
Groovy
def opencvVersion = '4.8.0-4'
|
|
|
|
if (project.hasProperty('useCpp') && project.useCpp) {
|
|
model {
|
|
binaries {
|
|
withType(NativeBinarySpec).all {
|
|
def binary = it
|
|
project.sharedCvConfigs.each {
|
|
if (binary.component.name == it.key) {
|
|
nativeUtils.useRequiredLibrary(binary, 'opencv_shared')
|
|
}
|
|
}
|
|
project.staticCvConfigs.each {
|
|
if (binary.component.name == it.key) {
|
|
nativeUtils.useRequiredLibrary(binary, 'opencv_static')
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
if (project.hasProperty('useJava') && project.useJava) {
|
|
dependencies {
|
|
implementation "edu.wpi.first.thirdparty.frc2024.opencv:opencv-java:${opencvVersion}"
|
|
if (!project.hasProperty('skipDev') || !project.skipDev) {
|
|
devImplementation "edu.wpi.first.thirdparty.frc2024.opencv:opencv-java:${opencvVersion}"
|
|
}
|
|
if (project.hasProperty('useDocumentation') && project.useDocumentation) {
|
|
javaSource "edu.wpi.first.thirdparty.frc2024.opencv:opencv-java:${opencvVersion}:sources"
|
|
}
|
|
}
|
|
}
|