Auto-generate version.h

This commit is contained in:
Grant Limberg 2019-08-12 12:43:28 -07:00
parent 68b94a3188
commit 4fae382ffd
3 changed files with 17 additions and 4 deletions

1
.gitignore vendored
View File

@ -120,3 +120,4 @@ __pycache__
*~
attic/world/*.c25519
attic/world/mkworld
/version.h

View File

@ -2,6 +2,13 @@
cmake_minimum_required (VERSION 3.8)
# ZeroTier One Version Config
set(ZEROTIER_ONE_VERSION_MAJOR 1)
set(ZEROTIER_ONE_VERSION_MINOR 4)
set(ZEROTIER_ONE_VERSION_REVISION 2)
set(ZEROTIER_ONE_VERSION_BUILD 0)
# Set a default build type if none was specified
set(default_build_type "Release")
if(EXISTS "${CMAKE_SOURCE_DIR}/.git")
@ -80,6 +87,11 @@ set(libs
zt_controller
)
configure_file(
version.h.in
${CMAKE_SOURCE_DIR}/version.h
)
set(src
one.cpp
"ext/http-parser/http_parser.c"

View File

@ -30,17 +30,17 @@
/**
* Major version
*/
#define ZEROTIER_ONE_VERSION_MAJOR 1
#define ZEROTIER_ONE_VERSION_MAJOR @ZEROTIER_ONE_VERSION_MAJOR@
/**
* Minor version
*/
#define ZEROTIER_ONE_VERSION_MINOR 4
#define ZEROTIER_ONE_VERSION_MINOR @ZEROTIER_ONE_VERSION_MINOR@
/**
* Revision
*/
#define ZEROTIER_ONE_VERSION_REVISION 2
#define ZEROTIER_ONE_VERSION_REVISION @ZEROTIER_ONE_VERSION_REVISION@
/**
* Build version
@ -49,7 +49,7 @@
* to force a minor update without an actual version number change. It's
* not part of the actual release version number.
*/
#define ZEROTIER_ONE_VERSION_BUILD 0
#define ZEROTIER_ONE_VERSION_BUILD @ZEROTIER_ONE_VERSION_BUILD@
#ifndef ZT_BUILD_ARCHITECTURE
#define ZT_BUILD_ARCHITECTURE 0