feat: add support for .source_version

When building packages, especially when source packages are used, git is
not necessarily available or the source isn't provided in git. In those
cases it wasn't possible to set the GIT_REVISION and --version shows
"n/a" for the git revision.

If the file .source_version is available now the content of it is used
as GIT_REVISION. Packagers might want to add a .source_version file
when they don't build the packages from git.

Possible breaking change:

The variable PRODUCT_VERSION isn't available anymore. Use GIT_REVISION
instead.
This commit is contained in:
Bernhard Miklautz
2017-10-06 13:52:10 +02:00
parent 73647adb5f
commit 1aec784f75
6 changed files with 15 additions and 64 deletions

View File

@@ -34,7 +34,6 @@ set(CMAKE_MODULE_PATH ${CMAKE_CURRENT_SOURCE_DIR}/../cmake/)
# Check for cmake compatibility (enable/disable features)
include(CheckCmakeCompat)
include(FindFeature)
include(AutoVersioning)
include(ConfigOptions)
include(CheckCCompilerFlag)
include(GNUInstallDirsWrapper)