| 1 |
/*************************************************************************** |
| 2 |
* Copyright (C) 2005-2019 by the FIFE team * |
| 3 |
* http://www.fifengine.net * |
| 4 |
* This file is part of FIFE. * |
| 5 |
* * |
| 6 |
* FIFE is free software; you can redistribute it and/or * |
| 7 |
* modify it under the terms of the GNU Lesser General Public * |
| 8 |
* License as published by the Free Software Foundation; either * |
| 9 |
* version 2.1 of the License, or (at your option) any later version. * |
| 10 |
* * |
| 11 |
* This library is distributed in the hope that it will be useful, * |
| 12 |
* but WITHOUT ANY WARRANTY; without even the implied warranty of * |
| 13 |
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * |
| 14 |
* Lesser General Public License for more details. * |
| 15 |
* * |
| 16 |
* You should have received a copy of the GNU Lesser General Public * |
| 17 |
* License along with this library; if not, write to the * |
| 18 |
* Free Software Foundation, Inc., * |
| 19 |
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA * |
| 20 |
***************************************************************************/ |
| 21 |
|
| 22 |
#ifndef FIFE_VERSION_H |
| 23 |
#define FIFE_VERSION_H |
| 24 |
|
| 25 |
/** |
| 26 |
* These version numbers are updated as part of the release process. |
| 27 |
* |
| 28 |
* The file "version.h.in" is a template file with placeholder tokens. |
| 29 |
* CMake replaces these tokens during the project configuration phase |
| 30 |
* and creates the file "version.h", see CMakeLists.txt. |
| 31 |
*/ |
| 32 |
|
| 33 |
#define FIFE_VERSION "@FIFE_VERSION@" |
| 34 |
#define FIFE_VERSION_SHORT "@FIFE_VERSION_SHORT@" |
| 35 |
#define FIFE_MAJOR_VERSION @FIFE_MAJOR_VERSION@ |
| 36 |
#define FIFE_MINOR_VERSION @FIFE_MINOR_VERSION@ |
| 37 |
#define FIFE_PATCH_VERSION @FIFE_PATCH_VERSION@ |
| 38 |
#define FIFE_GIT_HASH "@FIFE_GIT_HASH@" |
| 39 |
|
| 40 |
/** |
| 41 |
* All FIFE related code is in the "FIFE" namespace. |
| 42 |
* The namespace "fcn" (fifechan) is used for our custom widgets. |
| 43 |
*/ |
| 44 |
namespace FIFE { |
| 45 |
inline const char* getVersion() { |
| 46 |
return FIFE_VERSION; |
| 47 |
} |
| 48 |
|
| 49 |
inline const char* getVersionShort() { |
| 50 |
return FIFE_VERSION_SHORT; |
| 51 |
} |
| 52 |
|
| 53 |
inline int getMajor() { |
| 54 |
return FIFE_MAJOR_VERSION; |
| 55 |
} |
| 56 |
|
| 57 |
inline int getMinor() { |
| 58 |
return FIFE_MINOR_VERSION; |
| 59 |
} |
| 60 |
|
| 61 |
inline int getPatch() { |
| 62 |
return FIFE_PATCH_VERSION; |
| 63 |
} |
| 64 |
|
| 65 |
inline const char* getHash() { |
| 66 |
return FIFE_GIT_HASH; |
| 67 |
} |
| 68 |
|
| 69 |
inline const int getVersionId() { |
| 70 |
return FIFE_MAJOR_VERSION * 10000 + FIFE_MINOR_VERSION * 100 + FIFE_PATCH_VERSION; // 3.2.1 = 30201 |
| 71 |
} |
| 72 |
} //FIFE |
| 73 |
|
| 74 |
#endif //FIFE_VERSION_H |
| 75 |
|