integrate Brad Pitcher's cross compile linux->win32-mingw qmake stuff

stl_dim
Don Bright 2011-10-25 19:10:28 -05:00
parent e575aaaad8
commit 5f58255bcf
6 changed files with 54 additions and 18 deletions

View File

@ -1,4 +1,5 @@
boost {
isEmpty(DEPLOYDIR) {
# Optionally specify location of boost using the
# BOOSTDIR env. variable
@ -10,9 +11,16 @@ boost {
}
}
win32 {
LIBS += -llibboost_thread-vc90-mt-s-1_46_1 -llibboost_program_options-vc90-mt-s-1_46_1
CONFIG(mingw-cross-env) {
DEFINES += BOOST_STATIC
DEFINES += BOOST_THREAD_USE_LIB
DEFINES += Boost_USE_STATIC_LIBS
LIBS += -lboost_thread_win32-mt -lboost_program_options-mt
} else {
LIBS += -lboost_thread -lboost_program_options
win32 {
LIBS += -llibboost_thread-vc90-mt-s-1_46_1 -llibboost_program_options-vc90-mt-s-1_46_1
} else {
LIBS += -lboost_thread -lboost_program_options
}
}
}

View File

@ -13,14 +13,19 @@ cgal {
}
}
windows {
*-g++* {
QMAKE_CXXFLAGS += -frounding-math
}
LIBS += $$CGAL_DIR/auxiliary/gmp/lib/libmpfr-4.lib -lCGAL-vc90-mt-s
} else {
CONFIG(mingw-cross-env) {
LIBS += -lgmp -lmpfr -lCGAL
QMAKE_CXXFLAGS += -frounding-math
} else {
windows {
*-g++* {
QMAKE_CXXFLAGS += -frounding-math
}
LIBS += $$CGAL_DIR/auxiliary/gmp/lib/libmpfr-4.lib -lCGAL-vc90-mt-s
} else {
LIBS += -lgmp -lmpfr -lCGAL
QMAKE_CXXFLAGS += -frounding-math
}
}
}

View File

@ -5,14 +5,17 @@ EIGEN2_DIR = $$(EIGEN2DIR)
INCLUDEPATH += $$EIGEN2_DIR
}
else {
unix {
freebsd-g++ {
INCLUDEPATH += /usr/local/include/eigen2
CONFIG(mingw-cross-env) {
INCLUDEPATH += mingw-cross-env/include/eigen2
} else {
unix {
freebsd-g++ {
INCLUDEPATH += /usr/local/include/eigen2
} else {
macx: INCLUDEPATH += /opt/local/include/eigen2
}
} else {
macx: INCLUDEPATH += /opt/local/include/eigen2
INCLUDEPATH += /usr/include/eigen2
}
}
else {
INCLUDEPATH += /usr/include/eigen2
}
}

View File

@ -16,4 +16,6 @@ glew {
unix:LIBS += -lGLEW
win32:LIBS += -lglew32s
CONFIG(mingw-cross-env):DEFINES += GLEW_STATIC
}

View File

@ -73,6 +73,21 @@ isEmpty(VERSION) {
}
}
# cross compilation unix->win32
CONFIG(mingw-cross-env) {
LIBS += mingw-cross-env/lib/libglew32s.a
LIBS += mingw-cross-env/lib/libglut.a
LIBS += mingw-cross-env/lib/libopengl32.a
LIBS += mingw-cross-env/lib/libGLEW.a
LIBS += mingw-cross-env/lib/libglaux.a
LIBS += mingw-cross-env/lib/libglu32.a
LIBS += mingw-cross-env/lib/libopencsg.a
LIBS += mingw-cross-env/lib/libmpfr.a
LIBS += mingw-cross-env/lib/libCGAL.a
QMAKE_CXXFLAGS += -fpermissive
}
#configure lex / yacc
unix:freebsd-g++ {
QMAKE_LEX = /usr/local/bin/flex

View File

@ -35,8 +35,11 @@
#include <QDir>
#include <assert.h>
//isatty for visual c++
#ifdef _MSC_VER
//isatty for visual c++ and mingw-cross-env
#if defined __WIN32__ && ! defined _MSC_VER
#include "unistd.h"
#endif
#if defined __WIN32__ || defined _MSC_VER
extern "C" int __cdecl _isatty(int _FileHandle);
#define isatty _isatty
#endif