version.cpp 1.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748
  1. /*
  2. Minetest
  3. Copyright (C) 2013 celeron55, Perttu Ahola <celeron55@gmail.com>
  4. This program is free software; you can redistribute it and/or modify
  5. it under the terms of the GNU Lesser General Public License as published by
  6. the Free Software Foundation; either version 2.1 of the License, or
  7. (at your option) any later version.
  8. This program is distributed in the hope that it will be useful,
  9. but WITHOUT ANY WARRANTY; without even the implied warranty of
  10. MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  11. GNU Lesser General Public License for more details.
  12. You should have received a copy of the GNU Lesser General Public License along
  13. with this program; if not, write to the Free Software Foundation, Inc.,
  14. 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
  15. */
  16. #include "version.h"
  17. #include "config.h"
  18. #if USE_CMAKE_CONFIG_H
  19. #include "cmake_config_githash.h"
  20. #endif
  21. #ifndef VERSION_GITHASH
  22. #define VERSION_GITHASH VERSION_STRING
  23. #endif
  24. #define STRINGIFY(x) #x
  25. #define STR(x) STRINGIFY(x)
  26. const char *g_version_string = VERSION_STRING;
  27. const char *g_version_hash = VERSION_GITHASH;
  28. const char *g_build_info =
  29. "BUILD_TYPE=" BUILD_TYPE "\n"
  30. "RUN_IN_PLACE=" STR(RUN_IN_PLACE) "\n"
  31. "USE_CURL=" STR(USE_CURL) "\n"
  32. #ifndef SERVER
  33. "USE_GETTEXT=" STR(USE_GETTEXT) "\n"
  34. "USE_SOUND=" STR(USE_SOUND) "\n"
  35. #endif
  36. "STATIC_SHAREDIR=" STR(STATIC_SHAREDIR)
  37. #if USE_GETTEXT && defined(STATIC_LOCALEDIR)
  38. "\n" "STATIC_LOCALEDIR=" STR(STATIC_LOCALEDIR)
  39. #endif
  40. ;