introduce git-based versioning

MSCP_BUILD_VERSION (`git describe --tags --dirty --match "v*"`) is
passed through include/mscp_version.h.in and cmake.

When git is failed, use VERSION file instead (for building from
source tar balls that excludes .git).
This commit is contained in:
Ryo Nakamura
2023-08-04 16:02:22 +09:00
parent 24c1bc9149
commit 23d9577bde
4 changed files with 39 additions and 10 deletions

View File

@@ -0,0 +1,7 @@
#ifndef _MSCP_VERSION_H_
#define _MSCP_VERSION_H_
#define MSCP_VERSION "@MSCP_VERSION@"
#define MSCP_BUILD_VERSION "@MSCP_BUILD_VERSION@"
#endif /* _MSCP_VERSION_H_ */