Update/fix/improve config.h and cmake_config.h.in
parent
c301e3c82a
commit
0ac2ce7dea
|
@ -3,16 +3,17 @@
|
||||||
#ifndef CMAKE_CONFIG_H
|
#ifndef CMAKE_CONFIG_H
|
||||||
#define CMAKE_CONFIG_H
|
#define CMAKE_CONFIG_H
|
||||||
|
|
||||||
#define PROJECT_NAME "@PROJECT_NAME@"
|
#define CMAKE_PROJECT_NAME "@PROJECT_NAME@"
|
||||||
#define INSTALL_PREFIX "@CMAKE_INSTALL_PREFIX@"
|
#define CMAKE_INSTALL_PREFIX "@CMAKE_INSTALL_PREFIX@"
|
||||||
#define VERSION_STRING "@VERSION_STRING@"
|
#define CMAKE_VERSION_STRING "@VERSION_STRING@"
|
||||||
#define USE_GETTEXT @USE_GETTEXT@
|
|
||||||
#ifdef NDEBUG
|
#ifdef NDEBUG
|
||||||
#define BUILD_TYPE "Release"
|
#define CMAKE_BUILD_TYPE "Release"
|
||||||
#else
|
#else
|
||||||
#define BUILD_TYPE "Debug"
|
#define CMAKE_BUILD_TYPE "Debug"
|
||||||
#endif
|
#endif
|
||||||
#define BUILD_INFO "VER="VERSION_STRING" RUN_IN_PLACE=@RUN_IN_PLACE@ USE_GETTEXT=@USE_GETTEXT@ INSTALL_PREFIX=@CMAKE_INSTALL_PREFIX@ BUILD_TYPE="BUILD_TYPE
|
#define CMAKE_USE_GETTEXT @USE_GETTEXT@
|
||||||
|
#define CMAKE_USE_AUDIO @USE_AUDIO@
|
||||||
|
#define CMAKE_BUILD_INFO "VER=@VERSION_STRING@ BUILD_TYPE="CMAKE_BUILD_TYPE" RUN_IN_PLACE=@RUN_IN_PLACE@ USE_GETTEXT=@USE_GETTEXT@ USE_AUDIO=@USE_AUDIO@ INSTALL_PREFIX=@CMAKE_INSTALL_PREFIX@"
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
44
src/config.h
44
src/config.h
|
@ -6,30 +6,28 @@
|
||||||
#ifndef CONFIG_H
|
#ifndef CONFIG_H
|
||||||
#define CONFIG_H
|
#define CONFIG_H
|
||||||
|
|
||||||
|
#define PROJECT_NAME "Minetest"
|
||||||
|
#define VERSION_STRING "unknown"
|
||||||
|
#define BUILD_TYPE "unknown"
|
||||||
|
#define USE_GETTEXT 0
|
||||||
|
#define USE_AUDIO 0
|
||||||
|
#define BUILD_INFO "non-cmake"
|
||||||
|
|
||||||
#ifdef USE_CMAKE_CONFIG_H
|
#ifdef USE_CMAKE_CONFIG_H
|
||||||
#include "cmake_config.h"
|
#include "cmake_config.h"
|
||||||
#else
|
#undef PROJECT_NAME
|
||||||
#define PROJECT_NAME "minetest"
|
#define PROJECT_NAME CMAKE_PROJECT_NAME
|
||||||
|
#undef VERSION_STRING
|
||||||
//#define INSTALL_PREFIX ""
|
#define VERSION_STRING CMAKE_VERSION_STRING
|
||||||
#define VERSION_STRING "unknown"
|
#undef BUILD_INFO
|
||||||
#ifdef NDEBUG
|
#define BUILD_INFO CMAKE_BUILD_INFO
|
||||||
#define BUILD_TYPE "Release"
|
#undef USE_GETTEXT
|
||||||
#else
|
#define USE_GETTEXT CMAKE_USE_GETTEXT
|
||||||
#define BUILD_TYPE "Debug"
|
#undef USE_AUDIO
|
||||||
#endif
|
#define USE_AUDIO CMAKE_USE_AUDIO
|
||||||
#ifdef RUN_IN_PLACE
|
#undef BUILD_INFO
|
||||||
#define RUN_IN_PLACE_BOOLSTRING "1"
|
#define BUILD_INFO CMAKE_BUILD_INFO
|
||||||
#else
|
#endif
|
||||||
#define RUN_IN_PLACE_BOOLSTRING "0"
|
|
||||||
#endif
|
|
||||||
#if USE_GETTEXT
|
|
||||||
#define USE_GETTEXT_BOOLSTRING "1"
|
|
||||||
#else
|
|
||||||
#define USE_GETTEXT_BOOLSTRING "0"
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#define BUILD_INFO "NON-CMAKE RUN_IN_PLACE="RUN_IN_PLACE_BOOLSTRING" USE_GETTEXT="USE_GETTEXT_BOOLSTRING" BUILD_TYPE="BUILD_TYPE
|
|
||||||
#endif
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue