Fixed SDL build with mingw. In particular, replaced boost dependency by c++11.

This commit is contained in:
xawotihs
2013-12-08 22:30:25 +01:00
parent 3af4546ef7
commit 28ec24430d
9 changed files with 65 additions and 14 deletions

View File

@@ -150,7 +150,7 @@ console_main(int argc, char *argv[])
/* This is where execution begins [windowed apps] */
int WINAPI
WinMain(HINSTANCE hInst, HINSTANCE hPrev, LPTSTR szCmdLine, int sw)
WinMain(HINSTANCE hInst,HINSTANCE hPrev,LPSTR szCmdLine,int sw)
{
char **argv;
int argc;

View File

@@ -23,7 +23,7 @@ std::string ToHex(T* pointer)
return stream.str();
}
#ifdef LINUX
#if defined(LINUX) && !defined(OutputDebugString)
#define OutputDebugString(val) (std::cerr << val);
#endif

View File

@@ -1,7 +1,7 @@
#ifndef THREADING_H
#define THREADING_H
#if !defined(PSP) && !defined(QT_CONFIG) && !defined(WP8)
#if !defined(PSP) && !defined(QT_CONFIG) && !defined(WP8) && !(defined(SDL_CONFIG) && defined(__MINGW32__))
#include <boost/date_time.hpp>
#ifdef WIN32
@@ -537,7 +537,7 @@ namespace boost
}
}
#elif defined(WP8)
#elif defined(WP8) || (defined(SDL_CONFIG) && defined(__MINGW32__))
#include <thread>
#include <mutex>

View File

@@ -53,7 +53,7 @@ extern "C" {
#include "../../include/JFileSystem.h"
#include "../../include/JAssert.h"
#if (defined WIN32) && (!defined QT_CONFIG)
#if (defined WIN32) && (!defined QT_CONFIG) && (!defined __MINGW32__)
#ifndef __attribute__
#define __attribute__((a))
#endif

View File

@@ -1,7 +1,7 @@
#ifndef WRESOURCE_FWD_H
#define WRESOURCE_FWD_H
#ifndef WP8
#if !defined(WP8) && !defined(SDL_CONFIG)
#include <boost/shared_ptr.hpp>
typedef boost::shared_ptr<JQuad> JQuadPtr;
#else

View File

@@ -89,7 +89,7 @@ void GameApp::Create()
{
srand((unsigned int) time(0)); // initialize random
#if !defined(QT_CONFIG) && !defined(IOS)
#if defined (WIN32)
#if defined (WIN32) && !defined(__MINGW32__)
_CrtSetDbgFlag ( _CRTDBG_ALLOC_MEM_DF | _CRTDBG_LEAK_CHECK_DF );
#elif defined (PSP)
pspFpuSetEnable(0); //disable FPU Exceptions until we find where the FPU errors come from

View File

@@ -2,16 +2,17 @@
#-------------------------------------------------
include(wagic.pri)
CONFIG -= qt
DEFINES += SDL_CONFIG
#
# Project created by QtCreator 2010-06-30T19:48:30
#
QT -= core gui opengl network declarative
#unix|windows:QMAKE_CXXFLAGS += -std=c++11
unix|windows:QMAKE_CXXFLAGS += -std=c++11
INCLUDEPATH += ../../JGE/Dependencies/SDL/include
INCLUDEPATH += ../../JGE/Dependencies/libjpeg
unix:INCLUDEPATH += /usr/include/GL
unix:INCLUDEPATH += /usr/local/include/SDL
OBJECTS_DIR = objs
@@ -20,17 +21,64 @@ DESTDIR = bin
macx|unix:LIBS += -lz -lboost_thread-mt
unix:LIBS += -ljpeg -lgif -lpng12 -L/usr/local/lib -lGL -lGLU -lSDL
windows:LIBS += -L../../JGE/Dependencies/lib -L../../Boost/lib -llibjpeg-static-mt-debug -lgiflib -llibpng -lfmodvc
CONFIG(debug, debug|release):SOURCES += src/TestSuiteAI.cpp
windows:LIBS += -L../../JGE/Dependencies/lib -L../../Boost/lib -lgiflib -llibpng -lfmodvc -lGdi32 -lopengl32 -lWinmm -lglu32 -lOle32 -lImm32 -lVersion -lOleAut32
# JGE, could probably be moved outside
SOURCES += \
../../JGE/src/pc/JGfx.cpp\
../../JGE/src/SDLmain.cpp\
../../JGE/Dependencies/SDL/src/main/windows/SDL_windows_main.c\
../../JGE/src/JMD2Model.cpp
windows{
SOURCES += \
../../JGE/Dependencies/libjpeg/jcapimin.c \
../../JGE/Dependencies/libjpeg/jcapistd.c \
../../JGE/Dependencies/libjpeg/jccoefct.c \
../../JGE/Dependencies/libjpeg/jccolor.c \
../../JGE/Dependencies/libjpeg/jcdctmgr.c \
../../JGE/Dependencies/libjpeg/jchuff.c \
../../JGE/Dependencies/libjpeg/jcinit.c \
../../JGE/Dependencies/libjpeg/jcmainct.c \
../../JGE/Dependencies/libjpeg/jcmarker.c \
../../JGE/Dependencies/libjpeg/jcmaster.c \
../../JGE/Dependencies/libjpeg/jcomapi.c \
../../JGE/Dependencies/libjpeg/jcparam.c \
../../JGE/Dependencies/libjpeg/jcphuff.c \
../../JGE/Dependencies/libjpeg/jcprepct.c \
../../JGE/Dependencies/libjpeg/jcsample.c \
../../JGE/Dependencies/libjpeg/jdapimin.c \
../../JGE/Dependencies/libjpeg/jdapistd.c \
../../JGE/Dependencies/libjpeg/jdatadst.c \
../../JGE/Dependencies/libjpeg/jdatasrc.c \
../../JGE/Dependencies/libjpeg/jdcoefct.c \
../../JGE/Dependencies/libjpeg/jdcolor.c \
../../JGE/Dependencies/libjpeg/jddctmgr.c \
../../JGE/Dependencies/libjpeg/jdhuff.c \
../../JGE/Dependencies/libjpeg/jdinput.c \
../../JGE/Dependencies/libjpeg/jdmainct.c \
../../JGE/Dependencies/libjpeg/jdmarker.c \
../../JGE/Dependencies/libjpeg/jdmaster.c \
../../JGE/Dependencies/libjpeg/jdmerge.c \
../../JGE/Dependencies/libjpeg/jdphuff.c \
../../JGE/Dependencies/libjpeg/jdpostct.c \
../../JGE/Dependencies/libjpeg/jdsample.c \
../../JGE/Dependencies/libjpeg/jerror.c \
../../JGE/Dependencies/libjpeg/jfdctflt.c \
../../JGE/Dependencies/libjpeg/jfdctfst.c \
../../JGE/Dependencies/libjpeg/jfdctint.c \
../../JGE/Dependencies/libjpeg/jidctflt.c \
../../JGE/Dependencies/libjpeg/jidctfst.c \
../../JGE/Dependencies/libjpeg/jidctint.c \
../../JGE/Dependencies/libjpeg/jmemmgr.c \
../../JGE/Dependencies/libjpeg/jmemnobs.c \
../../JGE/Dependencies/libjpeg/jquant1.c \
../../JGE/Dependencies/libjpeg/jquant2.c \
../../JGE/Dependencies/libjpeg/jutils.c
DEFINES += SDL_ATOMIC_DISABLED
SOURCES += \
../../JGE/Dependencies/SDL/src/core/windows/SDL_windows.c\
../../JGE/Dependencies/SDL/src/events/SDL_clipboardevents.c\

View File

@@ -39,7 +39,7 @@ android:INCLUDEPATH += $$ANDROID_NDK_ROOT/platforms/android-9/arch-arm/usr/inclu
CONFIG(graphics, graphics|console){
HEADERS += \
../../JGE/include/qt/filedownloader.h\
../../JGE/include/qt/corewrapper.h
../../JGE/include/qt/qtcorewrapper.h
SOURCES += \
../../JGE/src/corewrapper.cpp\

View File

@@ -22,6 +22,7 @@ DEFINES += TIXML_USE_STL
windows:INCLUDEPATH += ../../JGE/Dependencies/include
windows{
*-g++* {
DEFINES += WIN32
DEFINES += LINUX
INCLUDEPATH += /usr/i686-w64-mingw32/sys-root/mingw/include/Qt
# INCLUDEPATH += /usr/i686-w64-mingw32/sys-root/mingw/include/c++
@@ -42,7 +43,7 @@ INCLUDEPATH += include
unix:!symbian:LIBS += -lz
win32:LIBS += ../../JGE/Dependencies/lib/fmodvc.lib
win32:LIBS += ../../JGE/Dependencies/lib/zlibd.lib
PRECOMPILED_HEADER = include/PrecompiledHeader.h
#PRECOMPILED_HEADER = include/PrecompiledHeader.h
#DEFINES += TRACK_OBJECT_USAGE
#DEFINES += AI_CHANGE_TESTING
@@ -282,6 +283,7 @@ HEADERS += \
# JGE, could probably be moved outside
SOURCES += \
../../JGE/src/corewrapper.cpp\
../../JGE/src/Encoding.cpp\
../../JGE/src/JAnimator.cpp\
../../JGE/src/JApp.cpp\
@@ -319,6 +321,7 @@ SOURCES += \
../../JGE/src/zipFS/zstream.cpp
HEADERS += \
../../JGE/include/corewrapper.h\
../../JGE/include/Threading.h\
../../JGE/include/decoder_prx.h\
../../JGE/include/DebugRoutines.h\