From 9fbb0889a7a73d3e879f76aa4c398dcb78c532ed Mon Sep 17 00:00:00 2001 From: Perttu Ahola Date: Sat, 8 Jan 2011 17:34:25 +0200 Subject: CMake stuff works now on linux and windows... and should be possible to make to work on OS X. --- src/servermain.cpp | 21 ++++++++++++++------- 1 file changed, 14 insertions(+), 7 deletions(-) (limited to 'src/servermain.cpp') diff --git a/src/servermain.cpp b/src/servermain.cpp index d9b8af402..8fcefaae7 100644 --- a/src/servermain.cpp +++ b/src/servermain.cpp @@ -25,12 +25,13 @@ with this program; if not, write to the Free Software Foundation, Inc., #ifndef SERVER #ifdef _WIN32 + #pragma error ("For a server build, SERVER must be defined globally") #else #error "For a server build, SERVER must be defined globally" #endif #endif -#ifdef UNITTEST_DISABLE +#ifdef NDEBUG #ifdef _WIN32 #pragma message ("Disabling unit tests") #else @@ -66,6 +67,7 @@ with this program; if not, write to the Free Software Foundation, Inc., #include "strfnd.h" #include "porting.h" #include "materials.h" +#include "config.h" /* Settings. @@ -129,6 +131,12 @@ int main(int argc, char *argv[]) BEGIN_DEBUG_EXCEPTION_HANDLER + // Print startup message + dstream< filenames; filenames.push_back(porting::path_userdata + "/minetest.conf"); +#ifdef RUN_IN_PLACE + filenames.push_back(porting::path_userdata + "/../minetest.conf"); +#endif for(u32 i=0; i