summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorErik Schilling <ablu.erikschilling@googlemail.com>2013-02-03 20:42:11 +0100
committerErik Schilling <ablu.erikschilling@googlemail.com>2013-02-03 22:45:28 +0100
commit59a7bc4694a93aae668f2d68409a420a12e8d9fb (patch)
treef6202e913064d28aea7f63dde37ecd39050b6a96 /src
parent19d932391160ac75a05cda7f657ce2a271491935 (diff)
downloadmanaserv-59a7bc4694a93aae668f2d68409a420a12e8d9fb.tar.gz
manaserv-59a7bc4694a93aae668f2d68409a420a12e8d9fb.tar.xz
manaserv-59a7bc4694a93aae668f2d68409a420a12e8d9fb.zip
Modifications to allow crosscompiling with mingw
Reviewed-by: bjorn.
Diffstat (limited to 'src')
-rw-r--r--src/CMakeLists.txt8
-rw-r--r--src/account-server/main-account.cpp4
-rw-r--r--src/common/winver.h6
-rw-r--r--src/common/winver.h.in6
-rw-r--r--src/game-server/main-game.cpp1
-rw-r--r--src/net/messagein.cpp1
-rw-r--r--src/net/messageout.cpp1
7 files changed, 23 insertions, 4 deletions
diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt
index 1d06c5d..c8752fb 100644
--- a/src/CMakeLists.txt
+++ b/src/CMakeLists.txt
@@ -37,7 +37,7 @@ IF (MINGW)
"<CMAKE_RC_COMPILER> <FLAGS> <DEFINES> -O coff -o <OBJECT> <SOURCE>")
ENDIF()
-SET(FLAGS "-DPACKAGE_VERSION=\\\"${VERSION}\\\"")
+SET(FLAGS "${FLAGS} -DPACKAGE_VERSION=\\\"${VERSION}\\\"")
SET(FLAGS "${FLAGS} -DPKG_DATADIR=\\\"${PKG_DATADIR}/\\\"")
SET(FLAGS "${FLAGS} -DLOCALEDIR=\\\"${LOCALEDIR}/\\\"")
@@ -94,8 +94,8 @@ INCLUDE_DIRECTORIES(
${CMAKE_CURRENT_SOURCE_DIR}
${PHYSFS_INCLUDE_DIR}
${LIBXML2_INCLUDE_DIR}
- ${SigC++_INCLUDE_DIR}
- ${SigC++Config_INCLUDE_DIR}
+ ${SIGC++_INCLUDE_DIR}
+ ${SIGC++Config_INCLUDE_DIR}
)
# Fix some stuff that gets not hidden by mainline modules
@@ -319,7 +319,7 @@ FOREACH(program ${PROGRAMS})
${PHYSFS_LIBRARY}
${LIBXML2_LIBRARIES}
${ZLIB_LIBRARIES}
- ${SigC++_LIBRARIES}
+ ${SIGC++_LIBRARIES}
${OPTIONAL_LIBRARIES}
${EXTRA_LIBRARIES})
INSTALL(TARGETS ${program} RUNTIME DESTINATION ${PKG_BINDIR})
diff --git a/src/account-server/main-account.cpp b/src/account-server/main-account.cpp
index ab4df75..db69fe6 100644
--- a/src/account-server/main-account.cpp
+++ b/src/account-server/main-account.cpp
@@ -23,6 +23,10 @@
#include "../config.h"
#endif
+#ifdef __MINGW32__
+#include "common/winver.h"
+#endif
+
#include "account-server/accounthandler.h"
#include "account-server/serverhandler.h"
#include "account-server/storage.h"
diff --git a/src/common/winver.h b/src/common/winver.h
new file mode 100644
index 0000000..03a0c21
--- /dev/null
+++ b/src/common/winver.h
@@ -0,0 +1,6 @@
+/* VERSION DEFINITIONS */
+#define VER_MAJOR 0
+#define VER_MINOR 1
+#define VER_RELEASE 0
+#define VER_BUILD 0
+#define PACKAGE_VERSION "0.1.0.0"
diff --git a/src/common/winver.h.in b/src/common/winver.h.in
new file mode 100644
index 0000000..fb0aac2
--- /dev/null
+++ b/src/common/winver.h.in
@@ -0,0 +1,6 @@
+/* VERSION DEFINITIONS */
+#define VER_MAJOR ${VER_MAJOR}
+#define VER_MINOR ${VER_MINOR}
+#define VER_RELEASE ${VER_RELEASE}
+#define VER_BUILD ${VER_BUILD}
+#define PACKAGE_VERSION "${VERSION}"
diff --git a/src/game-server/main-game.cpp b/src/game-server/main-game.cpp
index 5814f0b..f76189f 100644
--- a/src/game-server/main-game.cpp
+++ b/src/game-server/main-game.cpp
@@ -54,6 +54,7 @@
#ifdef __MINGW32__
#include <windows.h>
+#include "common/winver.h"
#define usleep(usec) (Sleep ((usec) / 1000), 0)
#endif
diff --git a/src/net/messagein.cpp b/src/net/messagein.cpp
index b797f0a..ce1be48 100644
--- a/src/net/messagein.cpp
+++ b/src/net/messagein.cpp
@@ -27,6 +27,7 @@
#ifndef USE_NATIVE_DOUBLE
#include <sstream>
#endif
+#include <stdint.h>
#include "net/messagein.h"
#include "utils/logger.h"
diff --git a/src/net/messageout.cpp b/src/net/messageout.cpp
index 00bb623..af305a6 100644
--- a/src/net/messageout.cpp
+++ b/src/net/messageout.cpp
@@ -28,6 +28,7 @@
#include <limits>
#include <sstream>
#endif
+#include <stdint.h>
#include <string>
#include <enet/enet.h>