mirror of
https://github.com/wpilibsuite/allwpilib
synced 2026-06-29 02:21:44 +00:00
[cscore] Try loading debug OpenCV if release version fails (#6928)
On some Linux systems, installing the OpenCV package will actually install a debug version with a d postfix. Try loading that version if the first load attempt failed.
This commit is contained in:
@@ -46,7 +46,13 @@ public final class OpenCvLoader {
|
||||
RuntimeLoader.loadLibrary(Core.NATIVE_LIBRARY_NAME);
|
||||
} catch (IOException ex) {
|
||||
ex.printStackTrace();
|
||||
System.exit(1);
|
||||
try {
|
||||
// Try adding a debug postfix
|
||||
RuntimeLoader.loadLibrary(Core.NATIVE_LIBRARY_NAME + "d");
|
||||
} catch (IOException e) {
|
||||
e.printStackTrace();
|
||||
System.exit(1);
|
||||
}
|
||||
}
|
||||
libraryLoaded = true;
|
||||
}
|
||||
@@ -70,7 +76,13 @@ public final class OpenCvLoader {
|
||||
if (libraryLoaded) {
|
||||
return;
|
||||
}
|
||||
RuntimeLoader.loadLibrary(Core.NATIVE_LIBRARY_NAME);
|
||||
try {
|
||||
RuntimeLoader.loadLibrary(Core.NATIVE_LIBRARY_NAME);
|
||||
} catch (IOException e) {
|
||||
e.printStackTrace();
|
||||
// Try adding a debug postfix
|
||||
RuntimeLoader.loadLibrary(Core.NATIVE_LIBRARY_NAME + "d");
|
||||
}
|
||||
libraryLoaded = true;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user