Re-add tag support for the version string.

pull/268/head
Mooneer Salem 2022-08-14 16:49:53 -07:00
parent 98611a63f0
commit 0e3315ef62
3 changed files with 14 additions and 1 deletions

View File

@ -13,6 +13,10 @@ project(FreeDV
LANGUAGES C CXX
)
# Adds a tag to the end of the version string. Leave empty
# for official release builds.
set(FREEDV_VERSION_TAG "devel")
# Prevent in-source builds to protect automake/autoconf config.
# If an in-source build is attempted, you will still need to clean up a few
# files manually.

View File

@ -6,6 +6,10 @@
#define FREEDV_VERSION_PATCH @FreeDV_VERSION_PATCH@
#define FREEDV_VERSION_SUFFIX @FreeDV_VERSION_TWEAK@
#define FREEDV_VERSION "@FreeDV_VERSION@"
#if defined(FREEDV_VERSION_TAG)
#define FREEDV_VERSION ("@FreeDV_VERSION@-" FREEDV_VERSION_TAG)
#else
#define FREEDV_VERSION ("@FreeDV_VERSION@-")
#endif // defined(FREEDV_VERSION_TAG)
#endif //FREEDV_VER_DOT_H

View File

@ -113,6 +113,11 @@ add_definitions(-DAPPLE_OLD_XCODE)
endif(CMAKE_CXX_COMPILER_VERSION VERSION_LESS 9.0.0.900037)
endif(APPLE)
# If a release tag's set, pass it to the compiler.
if(FREEDV_VERSION_TAG)
add_definitions(-DFREEDV_VERSION_TAG="${FREEDV_VERSION_TAG}")
endif(FREEDV_VERSION_TAG)
# Insert source and generated header directories before other search directories.
include_directories(BEFORE ${CMAKE_CURRENT_BINARY_DIR} ${CMAKE_CURRENT_SOURCE_DIR})