forked from opencv/opencv
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Added interface to check library version during runtime
- Loading branch information
Showing
5 changed files
with
50 additions
and
8 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,14 +1,14 @@ | ||
// these constants are wrapped inside functions to prevent inlining | ||
private static String getVersion() { return "@OPENCV_VERSION@"; } | ||
private static String getNativeLibraryName() { return "opencv_java@OPENCV_VERSION_MAJOR@@OPENCV_VERSION_MINOR@@OPENCV_VERSION_PATCH@"; } | ||
private static int getVersionMajor() { return @OPENCV_VERSION_MAJOR@; } | ||
private static int getVersionMinor() { return @OPENCV_VERSION_MINOR@; } | ||
private static int getVersionRevision() { return @OPENCV_VERSION_PATCH@; } | ||
private static String getVersionStatus() { return "@OPENCV_VERSION_STATUS@"; } | ||
private static int getVersionMajorJ() { return @OPENCV_VERSION_MAJOR@; } | ||
private static int getVersionMinorJ() { return @OPENCV_VERSION_MINOR@; } | ||
private static int getVersionRevisionJ() { return @OPENCV_VERSION_PATCH@; } | ||
private static String getVersionStatusJ() { return "@OPENCV_VERSION_STATUS@"; } | ||
|
||
public static final String VERSION = getVersion(); | ||
public static final String NATIVE_LIBRARY_NAME = getNativeLibraryName(); | ||
public static final int VERSION_MAJOR = getVersionMajor(); | ||
public static final int VERSION_MINOR = getVersionMinor(); | ||
public static final int VERSION_REVISION = getVersionRevision(); | ||
public static final String VERSION_STATUS = getVersionStatus(); | ||
public static final int VERSION_MAJOR = getVersionMajorJ(); | ||
public static final int VERSION_MINOR = getVersionMinorJ(); | ||
public static final int VERSION_REVISION = getVersionRevisionJ(); | ||
public static final String VERSION_STATUS = getVersionStatusJ(); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters