mirror of
https://github.com/Xaymar/obs-StreamFX
synced 2024-11-24 04:15:11 +00:00
cmake: Improve automatic versioning
This commit is contained in:
parent
118cd2c6d8
commit
0b5a848c32
1 changed files with 13 additions and 3 deletions
|
@ -18,8 +18,18 @@
|
|||
*/
|
||||
|
||||
#pragma once
|
||||
#include <inttypes.h>
|
||||
|
||||
const uint16_t PLUGIN_VERSION_MAJOR = @VERSION_MAJOR@;
|
||||
const uint16_t PLUGIN_VERSION_MINOR = @VERSION_MINOR@;
|
||||
const uint32_t PLUGIN_VERSION_PATCH = @VERSION_PATCH@;
|
||||
#define MAKE_VERSION(major,minor,patch,tweak) ((uint64_t(major) & 0xFFFFull) << 48ull) | ((uint64_t(minor) & 0xFFFFull) << 32ull) | ((uint64_t(patch) & 0xFFFFull) << 16ull) | ((uint64_t(patch) & 0xFFFFull))
|
||||
|
||||
const uint16_t PROJECT_VERSION_MAJOR = @PROJECT_VERSION_MAJOR@;
|
||||
const uint16_t PROJECT_VERSION_MINOR = @PROJECT_VERSION_MINOR@;
|
||||
const uint16_t PROJECT_VERSION_PATCH = @PROJECT_VERSION_PATCH@;
|
||||
const uint16_t PROJECT_VERSION_TWEAK = @PROJECT_VERSION_TWEAK@;
|
||||
const uint64_t PROJECT_VERSION = MAKE_VERSION(PROJECT_VERSION_MAJOR, PROJECT_VERSION_MINOR, PROJECT_VERSION_PATCH, PROJECT_VERSION_TWEAK);
|
||||
|
||||
const uint16_t PLUGIN_VERSION_MAJOR = @PROJECT_VERSION_MAJOR@;
|
||||
const uint16_t PLUGIN_VERSION_MINOR = @PROJECT_VERSION_MINOR@;
|
||||
const uint16_t PLUGIN_VERSION_PATCH = @PROJECT_VERSION_PATCH@;
|
||||
const uint16_t PLUGIN_VERSION_TWEAK = @PROJECT_VERSION_TWEAK@;
|
||||
const uint64_t PLUGIN_VERSION_FULL = (((uint64_t)(PLUGIN_VERSION_MAJOR & 0xFFFF) << 48ull) | ((uint64_t)(PLUGIN_VERSION_MINOR & 0xFFFF) << 32ull) | ((uint64_t)(PLUGIN_VERSION_PATCH) & 0xFFFFFFFF));
|
||||
|
|
Loading…
Reference in a new issue