X-Git-Url: https://git.lizzy.rs/?a=blobdiff_plain;f=src%2Fconfig.h;h=5e116464213765b6546e7be4e691f1066ae077e8;hb=5505a6af00145263acfeeef7fe27d86dc6ab0351;hp=37dc6e0ef345ebce35ab91d1223b2889f3742f5b;hpb=22e186b4aa88b585e71500c4e9a03bf69b0b6191;p=minetest.git diff --git a/src/config.h b/src/config.h index 37dc6e0ef..5e1164642 100644 --- a/src/config.h +++ b/src/config.h @@ -3,40 +3,28 @@ Otherwise use default values */ -#ifndef CONFIG_H -#define CONFIG_H +#pragma once -#define PROJECT_NAME "Minetest" -#define VERSION_STRING "unknown" -#define RUN_IN_PLACE 0 -#define USE_GETTEXT 0 -#define USE_SOUND 0 -#define USE_CURL 0 -#define USE_FREETYPE 0 -#define STATIC_SHAREDIR "" -#define BUILD_INFO "non-cmake" +#define STRINGIFY(x) #x +#define STR(x) STRINGIFY(x) -#ifdef USE_CMAKE_CONFIG_H - #include "cmake_config.h" - #undef PROJECT_NAME - #define PROJECT_NAME CMAKE_PROJECT_NAME - #undef VERSION_STRING - #define VERSION_STRING CMAKE_VERSION_STRING - #undef RUN_IN_PLACE - #define RUN_IN_PLACE CMAKE_RUN_IN_PLACE - #undef USE_GETTEXT - #define USE_GETTEXT CMAKE_USE_GETTEXT - #undef USE_SOUND - #define USE_SOUND CMAKE_USE_SOUND - #undef USE_CURL - #define USE_CURL CMAKE_USE_CURL - #undef USE_FREETYPE - #define USE_FREETYPE CMAKE_USE_FREETYPE - #undef STATIC_SHAREDIR - #define STATIC_SHAREDIR CMAKE_STATIC_SHAREDIR - #undef BUILD_INFO - #define BUILD_INFO CMAKE_BUILD_INFO -#endif +#if defined USE_CMAKE_CONFIG_H + #include "cmake_config.h" +#elif defined (__ANDROID__) + #define PROJECT_NAME "minetest" + #define PROJECT_NAME_C "Minetest" + #define STATIC_SHAREDIR "" + #define VERSION_STRING STR(VERSION_MAJOR) "." STR(VERSION_MINOR) "." STR(VERSION_PATCH) STR(VERSION_EXTRA) +#ifdef NDEBUG + #define BUILD_TYPE "Release" + #else + #define BUILD_TYPE "Debug" + #endif +#else + #ifdef NDEBUG + #define BUILD_TYPE "Release" + #else + #define BUILD_TYPE "Debug" + #endif #endif -