diff options
-rw-r--r-- | boost.pri | 14 | ||||
-rw-r--r-- | cgal.pri | 17 | ||||
-rw-r--r-- | eigen2.pri | 17 | ||||
-rw-r--r-- | glew.pri | 2 | ||||
-rw-r--r-- | openscad.pro | 15 | ||||
-rw-r--r-- | src/lexer.l | 7 |
6 files changed, 54 insertions, 18 deletions
@@ -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 + } } } @@ -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 + } } } @@ -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 - } } @@ -16,4 +16,6 @@ glew { unix:LIBS += -lGLEW win32:LIBS += -lglew32s + CONFIG(mingw-cross-env):DEFINES += GLEW_STATIC } + diff --git a/openscad.pro b/openscad.pro index 099af35..fbe0fa7 100644 --- a/openscad.pro +++ b/openscad.pro @@ -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 diff --git a/src/lexer.l b/src/lexer.l index 3cd4a19..cf5cb6d 100644 --- a/src/lexer.l +++ b/src/lexer.l @@ -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 |