1
0
mirror of https://github.com/vcmi/vcmi.git synced 2025-11-25 22:42:04 +02:00

define app version only in CMakeLists

now it's propagated to code via macros
This commit is contained in:
Andrey Filipenkov
2022-10-04 12:29:38 +03:00
parent af1f35779d
commit 92dd6d8c17
5 changed files with 12 additions and 18 deletions

View File

@@ -53,18 +53,10 @@ const TeamID TeamID::NO_TEAM = TeamID(255);
namespace GameConstants
{
const int VCMI_VERSION_MAJOR = 1;
const int VCMI_VERSION_MINOR = 1;
const int VCMI_VERSION_PATCH = 0;
const std::string VCMI_VERSION_STRING = std::to_string(VCMI_VERSION_MAJOR) + "." +
std::to_string(VCMI_VERSION_MINOR) + "." +
std::to_string(VCMI_VERSION_PATCH);
#ifdef VCMI_NO_EXTRA_VERSION
const std::string VCMI_VERSION = std::string("VCMI ") + VCMI_VERSION_STRING;
const std::string VCMI_VERSION = "VCMI " VCMI_VERSION_STRING;
#else
const std::string VCMI_VERSION = std::string("VCMI ") + VCMI_VERSION_STRING + "." + GIT_SHA1;
const std::string VCMI_VERSION = "VCMI " VCMI_VERSION_STRING "." + std::string{GIT_SHA1};
#endif
}