diff --git a/api/version.h.in b/api/version.h.in new file mode 100644 index 0000000000..fd1ad27608 --- /dev/null +++ b/api/version.h.in @@ -0,0 +1,8 @@ +#define TESSERACT_MAJOR_VERSION @GENERIC_MAJOR_VERSION@ +#define TESSERACT_MINOR_VERSION @GENERIC_MINOR_VERSION@ +#define TESSERACT_MICRO_VERSION @GENERIC_MICRO_VERSION@ +#define TESSERACT_VERSION \ + (TESSERACT_MAJOR_VERSION << 16 | \ + TESSERACT_MINOR_VERSION << 8 | \ + TESSERACT_MICRO_VERSION) +#define TESSERACT_VERSION_STR "@PACKAGE_VERSION@" diff --git a/configure.ac b/configure.ac index 7148efc8f3..e62282e277 100644 --- a/configure.ac +++ b/configure.ac @@ -479,6 +479,7 @@ fi # Output files AC_CONFIG_FILES([Makefile tesseract.pc]) AC_CONFIG_FILES([api/Makefile]) +AC_CONFIG_FILES([api/version.h]) AC_CONFIG_FILES([arch/Makefile]) AC_CONFIG_FILES([ccmain/Makefile]) AC_CONFIG_FILES([opencl/Makefile])