diff options
author | Evgenii Kliuchnikov <eustas@google.com> | 2023-07-30 03:44:38 -0700 |
---|---|---|
committer | Copybara-Service <copybara-worker@google.com> | 2023-07-30 03:45:11 -0700 |
commit | 27a9a80992e2308ef60bc6d840c8b59293c32d67 (patch) | |
tree | cb33f99de2956d231ba24cd509132aa09c45acee /c/common | |
parent | 0300be36ba019c55d2edc48353270fa18008d49c (diff) | |
download | brotli-27a9a80992e2308ef60bc6d840c8b59293c32d67.zip brotli-27a9a80992e2308ef60bc6d840c8b59293c32d67.tar.gz brotli-27a9a80992e2308ef60bc6d840c8b59293c32d67.tar.bz2 |
simplify CMake build
PiperOrigin-RevId: 552238545
Diffstat (limited to 'c/common')
-rw-r--r-- | c/common/version.h | 25 |
1 files changed, 19 insertions, 6 deletions
diff --git a/c/common/version.h b/c/common/version.h index 01b2998..0939eb8 100644 --- a/c/common/version.h +++ b/c/common/version.h @@ -9,18 +9,31 @@ #ifndef BROTLI_COMMON_VERSION_H_ #define BROTLI_COMMON_VERSION_H_ -/* This macro should only be used when library is compiled together with client. - If library is dynamically linked, use BrotliDecoderVersion and +/* Compose 3 components into a single number. In a hexadecimal representation + B and C components occupy exactly 3 digits. */ +#define BROTLI_MAKE_HEX_VERSION(A, B, C) ((A << 24) | (B << 12) | C) + +/* Those macros should only be used when library is compiled together with + the client. If library is dynamically linked, use BrotliDecoderVersion and BrotliEncoderVersion methods. */ -/* Semantic version, calculated as (MAJOR << 24) | (MINOR << 12) | PATCH */ -#define BROTLI_VERSION 0x1000009 +#define BROTLI_VERSION_MAJOR 1 +#define BROTLI_VERSION_MINOR 0 +#define BROTLI_VERSION_PATCH 9 + +#define BROTLI_VERSION BROTLI_MAKE_HEX_VERSION( \ + BROTLI_VERSION_MAJOR, BROTLI_VERSION_MINOR, BROTLI_VERSION_PATCH) /* This macro is used by build system to produce Libtool-friendly soname. See https://www.gnu.org/software/libtool/manual/html_node/Libtool-versioning.html + Version evolution rules: + - interfaces added (or change is compatible) -> current+1:0:age+1 + - interfaces removed (or changed is incompatible) -> current+1:0:0 + - interfaces not changed -> current:revision+1:age */ -/* ABI version, calculated as (CURRENT << 24) | (REVISION << 12) | AGE */ -#define BROTLI_ABI_VERSION 0x1009000 +#define BROTLI_ABI_CURRENT 1 +#define BROTLI_ABI_REVISION 9 +#define BROTLI_ABI_AGE 0 #endif /* BROTLI_COMMON_VERSION_H_ */ |