|
|
|
|
/*
|
|
|
|
|
* Copyright (C) 2011-2012 Daniel Scharrer
|
|
|
|
|
*
|
|
|
|
|
* This software is provided 'as-is', without any express or implied
|
|
|
|
|
* warranty. In no event will the author(s) be held liable for any damages
|
|
|
|
|
* arising from the use of this software.
|
|
|
|
|
*
|
|
|
|
|
* Permission is granted to anyone to use this software for any purpose,
|
|
|
|
|
* including commercial applications, and to alter it and redistribute it
|
|
|
|
|
* freely, subject to the following restrictions:
|
|
|
|
|
*
|
|
|
|
|
* 1. The origin of this software must not be misrepresented; you must not
|
|
|
|
|
* claim that you wrote the original software. If you use this software
|
|
|
|
|
* in a product, an acknowledgment in the product documentation would be
|
|
|
|
|
* appreciated but is not required.
|
|
|
|
|
* 2. Altered source versions must be plainly marked as such, and must not be
|
|
|
|
|
* misrepresented as being the original software.
|
|
|
|
|
* 3. This notice may not be removed or altered from any source distribution.
|
|
|
|
|
*/
|
|
|
|
|
|
|
|
|
|
#include "version.hpp"
|
|
|
|
|
|
|
|
|
|
/*!
|
|
|
|
|
* This file is automatically processed by cmake if the version or commit id changes.
|
|
|
|
|
* Available variables:
|
|
|
|
|
* - BASE_VERSION: The contents of the VERSION file.
|
|
|
|
|
* - BASE_VERSION_COUNT: Number of lines in the VERSION file.
|
|
|
|
|
* - BASE_VERSION_i: The i-th line of the VERSION file.
|
|
|
|
|
* - GIT_COMMIT: The current git commit. This variable is not defined if there is no .git directory.
|
|
|
|
|
* - GIT_COMMIT_PREFIX_i: The first i characters of the git commit (i=0..39).
|
|
|
|
|
* For the exact syntax see the documentation of the configure_file() cmake command.
|
|
|
|
|
*/
|
|
|
|
|
|
|
|
|
|
#cmakedefine GIT_COMMIT
|
|
|
|
|
|
|
|
|
|
#if ${BASE_VERSION_COUNT} != 2
|
|
|
|
|
#error "Configure error - the VERSION file should specify exactly two lines!"
|
|
|
|
|
#endif
|
|
|
|
|
|
|
|
|
|
#ifdef GIT_COMMIT
|
|
|
|
|
#define GIT_SUFFIX " + ${GIT_COMMIT_PREFIX_5}"
|
|
|
|
|
#else
|
|
|
|
|
#define GIT_SUFFIX ""
|
|
|
|
|
#endif
|
|
|
|
|
|
|
|
|
|
const std::string innoextract_version = "${BASE_VERSION_0}" GIT_SUFFIX;
|
|
|
|
|
|
|
|
|
|
const std::string innosetup_versions = "${BASE_VERSION_1}";
|