Files
allwpilib/shared/opencv.gradle
Thad House 3bcb89fb84 Set rpath on all unix platforms to $ORIGIN (#2299)
* Set rpath on all unix platforms to $ORIGIN

Will make it possible to extract JNI libraries easier
2020-06-23 21:03:04 -07:00

34 lines
1.2 KiB
Groovy

def opencvVersion = '3.4.7-3'
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.frc2020.opencv:opencv-java:${opencvVersion}"
if (!project.hasProperty('skipDev') || !project.skipDev) {
devImplementation "edu.wpi.first.thirdparty.frc2020.opencv:opencv-java:${opencvVersion}"
}
if (project.hasProperty('useDocumentation') && project.useDocumentation) {
javaSource "edu.wpi.first.thirdparty.frc2020.opencv:opencv-java:${opencvVersion}:sources"
}
}
}