X-Git-Url: https://git.lizzy.rs/?a=blobdiff_plain;f=src%2Fconfig.h;h=50e1184283368e1f32c2e173cfa96ec06ee5a038;hb=393c8392821bf3357d2ada3ac0afe065758acc53;hp=37dc6e0ef345ebce35ab91d1223b2889f3742f5b;hpb=8d920dd09b2c354bf9993d9184132f7f2a68b027;p=dragonfireclient.git diff --git a/src/config.h b/src/config.h index 37dc6e0ef..50e118428 100644 --- a/src/config.h +++ b/src/config.h @@ -3,40 +3,24 @@ 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" +#else + #if 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) + #endif + #ifdef NDEBUG + #define BUILD_TYPE "Release" + #else + #define BUILD_TYPE "Debug" + #endif #endif -