1
0
mirror of https://github.com/minetest/minetest.git synced 2025-07-01 15:40:23 +02:00

made old build system to work too. the cmake one doesn't make working binaries for some computers.

--HG--
rename : src/config.h.in => src/cmake_config.h.in
This commit is contained in:
Perttu Ahola
2011-01-18 15:05:29 +02:00
parent 515a480d0e
commit 3ef2629e84
7 changed files with 46 additions and 13 deletions

View File

@ -5,6 +5,9 @@ if(RUN_IN_PLACE)
add_definitions ( -DRUN_IN_PLACE )
endif(RUN_IN_PLACE)
# Use cmake_config.h
add_definitions ( -DUSE_CMAKE_CONFIG_H )
if(WIN32)
# Windows
# Surpress some warnings
@ -31,8 +34,8 @@ else()
endif()
configure_file(
"${PROJECT_SOURCE_DIR}/config.h.in"
"${PROJECT_BINARY_DIR}/config.h"
"${PROJECT_SOURCE_DIR}/cmake_config.h.in"
"${PROJECT_BINARY_DIR}/cmake_config.h"
)
set(minetest_SRCS
@ -140,7 +143,7 @@ if(MSVC)
# Visual Studio
# EHa enables SEH exceptions (used for catching segfaults)
set(CMAKE_CXX_FLAGS_RELEASE "/EHa /MD /O2 /Ob2 /Oi /Ot /Oy /GL /FD /MT /GS- /arch:SSE /fp:fast")
set(CMAKE_CXX_FLAGS_RELEASE "/EHa /MD /O2 /Ob2 /Oi /Ot /Oy /GL /FD /MT /GS- /arch:SSE /fp:fast /D NDEBUG")
set(CMAKE_CXX_FLAGS_DEBUG "/MDd /Zi /Ob0 /Od /RTC1")
if(BUILD_SERVER)

View File

@ -1,7 +1,7 @@
// Filled in by the build system
#ifndef CONFIG_H
#define CONFIG_H
#ifndef CMAKE_CONFIG_H
#define CMAKE_CONFIG_H
#define INSTALL_PREFIX "@CMAKE_INSTALL_PREFIX@"
#define VERSION_STRING "@VERSION_STRING@"

28
src/config.h Normal file
View File

@ -0,0 +1,28 @@
/*
If CMake is used, includes the cmake-generated cmake_config.h.
Otherwise use default values
*/
#ifndef CONFIG_H
#define CONFIG_H
#ifdef USE_CMAKE_CONFIG_H
#include "cmake_config.h"
#else
//#define INSTALL_PREFIX ""
#define VERSION_STRING "unknown"
#ifdef NDEBUG
#define BUILD_TYPE "Release"
#else
#define BUILD_TYPE "Debug"
#endif
#ifdef RUN_IN_PLACE
#define RUN_IN_PLACE_BOOLSTRING "1"
#else
#define RUN_IN_PLACE_BOOLSTRING "0"
#endif
#define BUILD_INFO "NON-CMAKE RUN_IN_PLACE="RUN_IN_PLACE_BOOLSTRING" BUILD_TYPE="BUILD_TYPE
#endif
#endif

View File

@ -151,6 +151,8 @@ TODO: Untie client network operations from framerate
- Needs some input queues or something
- Not really necessary?
TODO: Make morning and evening shorter
Server:
TODO: When player dies, throw items on map