version.cpp 828 B

123456789101112131415161718192021222324252627282930313233
  1. // Luanti
  2. // SPDX-License-Identifier: LGPL-2.1-or-later
  3. // Copyright (C) 2013 celeron55, Perttu Ahola <celeron55@gmail.com>
  4. #include "version.h"
  5. #include "config.h"
  6. #if USE_CMAKE_CONFIG_H
  7. #include "cmake_config_githash.h"
  8. #endif
  9. #ifndef VERSION_GITHASH
  10. #define VERSION_GITHASH VERSION_STRING
  11. #endif
  12. #define STRINGIFY(x) #x
  13. #define STR(x) STRINGIFY(x)
  14. const char *g_version_string = VERSION_STRING;
  15. const char *g_version_hash = VERSION_GITHASH;
  16. const char *g_build_info =
  17. "BUILD_TYPE=" BUILD_TYPE "\n"
  18. "RUN_IN_PLACE=" STR(RUN_IN_PLACE) "\n"
  19. "USE_CURL=" STR(USE_CURL) "\n"
  20. #if CHECK_CLIENT_BUILD()
  21. "USE_GETTEXT=" STR(USE_GETTEXT) "\n"
  22. "USE_SOUND=" STR(USE_SOUND) "\n"
  23. #endif
  24. "STATIC_SHAREDIR=" STR(STATIC_SHAREDIR)
  25. #if USE_GETTEXT && defined(STATIC_LOCALEDIR)
  26. "\n" "STATIC_LOCALEDIR=" STR(STATIC_LOCALEDIR)
  27. #endif
  28. ;