Add: introduce CMake for project management

CMake works on all our supported platforms, like MSVC, Mingw, GCC,
Clang, and many more. It allows for a single way of doing things,
so no longer we need shell scripts and vbs scripts to work on all
our supported platforms.

Additionally, CMake allows to generate project files for like MSVC,
KDevelop, etc.

This heavily reduces the lines of code we need to support multiple
platforms from a project perspective.

Addtiionally, this heavily improves our detection of libraries, etc.
This commit is contained in:
Patric Stout
2019-04-07 11:57:55 +02:00
committed by glx22
parent 85315e2e31
commit 56d54cf60e
69 changed files with 3116 additions and 1144 deletions

View File

@@ -35,7 +35,7 @@ bool IsReleasedVersion()
*
* <modified> shows a "M", if the binary is made from modified source code.
*/
const char _openttd_revision[] = "!!VERSION!!";
const char _openttd_revision[] = "${REV_VERSION}";
/**
* The text version of OpenTTD's build date.
@@ -48,12 +48,12 @@ const char _openttd_build_date[] = __DATE__ " " __TIME__;
/**
* The git revision hash of this version.
*/
const char _openttd_revision_hash[] = "!!GITHASH!!";
const char _openttd_revision_hash[] = "${REV_HASH}";
/**
* The year of this version.
*/
const char _openttd_revision_year[] = "!!YEAR!!";
const char _openttd_revision_year[] = "${REV_YEAR}";
/**
* Let us know if current build was modified. This detection
@@ -63,14 +63,14 @@ const char _openttd_revision_year[] = "!!YEAR!!";
* (compiling from sources without any version control software)
* and 2 is for modified revision.
*/
const byte _openttd_revision_modified = !!MODIFIED!!;
const byte _openttd_revision_modified = ${REV_MODIFIED};
/**
* Indicate whether this is a tagged version.
* If this is non-0, then _openttd_revision is the name of the tag,
* and the version is likely a beta, release candidate, or real release.
*/
const byte _openttd_revision_tagged = !!ISTAG!!;
const byte _openttd_revision_tagged = ${REV_ISTAG};
/**
* The NewGRF revision of OTTD:
@@ -85,4 +85,4 @@ const byte _openttd_revision_tagged = !!ISTAG!!;
* final release will always have a lower version number than the released
* version, thus making comparisons on specific revisions easy.
*/
const uint32 _openttd_newgrf_version = 1 << 28 | 11 << 24 | 0 << 20 | !!ISSTABLETAG!! << 19 | 28004;
const uint32 _openttd_newgrf_version = 1 << 28 | 11 << 24 | 0 << 20 | ${REV_ISSTABLETAG} << 19 | 28004;