X-Git-Url: https://git.lizzy.rs/?a=blobdiff_plain;f=src%2Fconfig.h;h=039100914499464da3cb7a80294eafdc443f17d9;hb=9a5d43a4f517e4f2e1810fe7c08b10e650552c52;hp=55bbb5beecd2420a3280202050af36778a1e9ffa;hpb=3e52dd5c6838e87acaa45a233fa322b7135251e4;p=minetest.git diff --git a/src/config.h b/src/config.h index 55bbb5bee..039100914 100644 --- a/src/config.h +++ b/src/config.h @@ -3,54 +3,38 @@ Otherwise use default values */ -#ifndef CONFIG_H -#define CONFIG_H +#pragma once -#define PROJECT_NAME "Minetest" -#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 USE_LEVELDB 0 -#define USE_LUAJIT 0 +#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 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 USE_LEVELDB - #define USE_LEVELDB CMAKE_USE_LEVELDB - #undef USE_LUAJIT - #define USE_LUAJIT CMAKE_USE_LUAJIT - #undef VERSION_MAJOR - #define VERSION_MAJOR CMAKE_VERSION_MAJOR - #undef VERSION_MINOR - #define VERSION_MINOR CMAKE_VERSION_MINOR - #undef VERSION_PATCH - #define VERSION_PATCH CMAKE_VERSION_PATCH - #undef VERSION_PATCH_ORIG - #define VERSION_PATCH_ORIG CMAKE_VERSION_PATCH_ORIG - #undef VERSION_STRING - #define VERSION_STRING CMAKE_VERSION_STRING - #undef PRODUCT_VERSION_STRING - #define PRODUCT_VERSION_STRING CMAKE_PRODUCT_VERSION_STRING - #undef VERSION_EXTRA_STRING - #define VERSION_EXTRA_STRING CMAKE_VERSION_EXTRA_STRING -#endif +#if defined USE_CMAKE_CONFIG_H + #include "cmake_config.h" +#elif defined (__ANDROID__) || defined (ANDROID) + #define PROJECT_NAME "minetest" + #define PROJECT_NAME_C "Minetest" + #define STATIC_SHAREDIR "" + #include "android_version.h" + #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 +#define BUILD_INFO \ + "BUILD_TYPE=" BUILD_TYPE "\n" \ + "RUN_IN_PLACE=" STR(RUN_IN_PLACE) "\n" \ + "USE_GETTEXT=" STR(USE_GETTEXT) "\n" \ + "USE_SOUND=" STR(USE_SOUND) "\n" \ + "USE_CURL=" STR(USE_CURL) "\n" \ + "USE_FREETYPE=" STR(USE_FREETYPE) "\n" \ + "USE_LUAJIT=" STR(USE_LUAJIT) "\n" \ + "STATIC_SHAREDIR=" STR(STATIC_SHAREDIR);