aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorclick <none@none>2010-08-26 16:40:28 +0200
committerclick <none@none>2010-08-26 16:40:28 +0200
commit3c027962ba861076932792c0714d3dbbb37c9c14 (patch)
tree62c10ab82574d750f271fd73263de8ccc93d7587
parent692779f2830cc9c14eb07cb70908694b3c5ad75a (diff)
Buildsystem/Core: Adjust MySQL headers on relevant files to use simplified #include <mysql.h> instead of <mysql/mysql.h>
+ add support for compiling under MacOSX (thanks to elegos for the research) NOTE: G3D requires a redefinition-hack under OSX, please see wiki for this info (dep-sources will not be changed) --HG-- branch : trunk
-rw-r--r--src/genrevision/CMakeLists.txt6
-rw-r--r--src/server/collision/BoundingIntervalHierarchy.h4
-rw-r--r--src/server/shared/Database/MySQLConnection.cpp3
-rwxr-xr-xsrc/server/shared/Database/QueryResult.h4
-rw-r--r--src/server/worldserver/CMakeLists.txt1
5 files changed, 14 insertions, 4 deletions
diff --git a/src/genrevision/CMakeLists.txt b/src/genrevision/CMakeLists.txt
index 60ec94f59d9..9e0376560e1 100644
--- a/src/genrevision/CMakeLists.txt
+++ b/src/genrevision/CMakeLists.txt
@@ -21,6 +21,12 @@ if( CMAKE_GENERATOR MATCHES "Visual Studio" )
COMMAND ${CMAKE_BINARY_DIR}/bin/$(ConfigurationName)/genrev -m $(ConfigurationName) ${CMAKE_SOURCE_DIR}
WORKING_DIRECTORY ${CMAKE_BINARY_DIR}
)
+elseif( CMAKE_GENERATOR MATCHES "Xcode" )
+ add_custom_command(TARGET genrev
+ POST_BUILD
+ COMMAND ${CMAKE_BINARY_DIR}/src/genrevision/$(CONFIGURATION)/genrev -m ${CMAKE_BUILD_TYPE} ${CMAKE_SOURCE_DIR}
+ WORKING_DIRECTORY ${CMAKE_BINARY_DIR}
+ )
else()
add_custom_command(TARGET genrev
POST_BUILD
diff --git a/src/server/collision/BoundingIntervalHierarchy.h b/src/server/collision/BoundingIntervalHierarchy.h
index 509eb3d2488..27b65957c47 100644
--- a/src/server/collision/BoundingIntervalHierarchy.h
+++ b/src/server/collision/BoundingIntervalHierarchy.h
@@ -31,6 +31,10 @@
#include <limits>
#include <cmath>
+#ifdef __APPLE__
+ #define isnan(x) ( std::isnan(x) )
+#endif
+
#define MAX_STACK_SIZE 64
#ifdef _MSC_VER
diff --git a/src/server/shared/Database/MySQLConnection.cpp b/src/server/shared/Database/MySQLConnection.cpp
index 9fe720bf1d1..ca06dca14c6 100644
--- a/src/server/shared/Database/MySQLConnection.cpp
+++ b/src/server/shared/Database/MySQLConnection.cpp
@@ -19,6 +19,9 @@
#include "Common.h"
+#ifdef _WIN32
+ #include <winsock2.h>
+#endif
#include <mysql.h>
#include "DatabaseEnv.h"
diff --git a/src/server/shared/Database/QueryResult.h b/src/server/shared/Database/QueryResult.h
index d87551996f5..5dfb03a1a16 100755
--- a/src/server/shared/Database/QueryResult.h
+++ b/src/server/shared/Database/QueryResult.h
@@ -28,10 +28,8 @@
#ifdef _WIN32
#include <winsock2.h>
- #include <mysql.h>
-#else
- #include <mysql/mysql.h>
#endif
+#include <mysql.h>
class QueryResult
{
diff --git a/src/server/worldserver/CMakeLists.txt b/src/server/worldserver/CMakeLists.txt
index 6c780a4cdbc..243f08ce65d 100644
--- a/src/server/worldserver/CMakeLists.txt
+++ b/src/server/worldserver/CMakeLists.txt
@@ -156,7 +156,6 @@ if( UNIX )
endif()
if( CMAKE_SYSTEM_NAME MATCHES "Darwin" )
- set(worldserver_LINK_FLAGS "-framework Carbon ${worldserver_LINK_FLAGS}")
set(SCRIPT_LIB "")
endif()