X-Git-Url: https://sigrok.org/gitweb/?a=blobdiff_plain;ds=sidebyside;f=include%2Flibsigrok%2Fversion.h.in;h=385097e81e58b7837972817560c94674d04d1987;hb=5bce22ac654fa45cdab49152bb3633ea77b4b7fc;hp=d0440913cb9ca6cfa616422dac582c26c47d1841;hpb=63d0fb752830fa8ea225ed9a9776e44a0ba66928;p=libsigrok.git diff --git a/include/libsigrok/version.h.in b/include/libsigrok/version.h.in index d0440913..385097e8 100644 --- a/include/libsigrok/version.h.in +++ b/include/libsigrok/version.h.in @@ -20,6 +20,21 @@ #ifndef LIBSIGROK_VERSION_H #define LIBSIGROK_VERSION_H +/* + * Only libsigrok library builds, and only parts of the library build, + * need to reference the git-version.h header file. Which contains the + * version suffix, which is relevant to local development, but is not + * applicable to release builds. Application builds need not bother with + * internal library version details, and always can get this information + * in text form for display purposes from the library at runtime. + */ +#if defined WANT_LIBSIGROK_GIT_VERSION_H +# include +#else +# undef SR_PACKAGE_VERSION_STRING_SUFFIX +# define SR_PACKAGE_VERSION_STRING_SUFFIX "" +#endif + /** * @file * @@ -37,32 +52,35 @@ */ /** The libsigrok package 'major' version number. */ -#define SR_PACKAGE_VERSION_MAJOR @SR_PACKAGE_VERSION_MAJOR@ +#undef SR_PACKAGE_VERSION_MAJOR /** The libsigrok package 'minor' version number. */ -#define SR_PACKAGE_VERSION_MINOR @SR_PACKAGE_VERSION_MINOR@ +#undef SR_PACKAGE_VERSION_MINOR /** The libsigrok package 'micro' version number. */ -#define SR_PACKAGE_VERSION_MICRO @SR_PACKAGE_VERSION_MICRO@ +#undef SR_PACKAGE_VERSION_MICRO /** The libsigrok package version ("major.minor.micro") as string. */ -#define SR_PACKAGE_VERSION_STRING "@SR_PACKAGE_VERSION@" +#define SR_PACKAGE_VERSION_STRING_PREFIX + +/** The libsigrok package version with git commit suffix. */ +#define SR_PACKAGE_VERSION_STRING (SR_PACKAGE_VERSION_STRING_PREFIX SR_PACKAGE_VERSION_STRING_SUFFIX) /* * Library/libtool version macros (can be used for conditional compilation). */ /** The libsigrok libtool 'current' version number. */ -#define SR_LIB_VERSION_CURRENT @SR_LIB_VERSION_CURRENT@ +#undef SR_LIB_VERSION_CURRENT /** The libsigrok libtool 'revision' version number. */ -#define SR_LIB_VERSION_REVISION @SR_LIB_VERSION_REVISION@ +#undef SR_LIB_VERSION_REVISION /** The libsigrok libtool 'age' version number. */ -#define SR_LIB_VERSION_AGE @SR_LIB_VERSION_AGE@ +#undef SR_LIB_VERSION_AGE /** The libsigrok libtool version ("current:revision:age") as string. */ -#define SR_LIB_VERSION_STRING "@SR_LIB_VERSION@" +#undef SR_LIB_VERSION_STRING /** @} */