summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--mingw-cross-env.pri27
-rw-r--r--openscad.pro11
-rwxr-xr-xscripts/mingw-x-build-dependencies.sh12
3 files changed, 32 insertions, 18 deletions
diff --git a/mingw-cross-env.pri b/mingw-cross-env.pri
index a1f3cb0..bc6f33a 100644
--- a/mingw-cross-env.pri
+++ b/mingw-cross-env.pri
@@ -8,19 +8,24 @@ CONFIG(mingw-cross-env) {
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/libgmp.a
LIBS += mingw-cross-env/lib/libCGAL.a
QMAKE_CXXFLAGS += -fpermissive
- Release:DESTDIR = release
- Release:OBJECTS_DIR = release/objects
- Release:MOC_DIR = release/moc
- Release:RCC_DIR = release/rcc
- Release:UI_DIR = release/ui
-
- Debug:DESTDIR = debug
- Debug:OBJECTS_DIR = debug/objects
- Debug:MOC_DIR = debug/moc
- Debug:RCC_DIR = debug/rcc
- Debug:UI_DIR = debug/ui
+
+ # Use different location for the cross-compiled binaries + .o files
+ # This allows compiling unix build + mingw build in same tree
+
+ DESTDIR=.
+
+ Release:DESTDIR = release_mingw32
+ Debug:DESTDIR = debug_mingw32
+
+ OBJECTS_DIR = $$DESTDIR/objects
+ MOC_DIR = $$DESTDIR/moc
+ RCC_DIR = $$DESTDIR/rcc
+ UI_DIR = $$DESTDIR/ui
+
}
+
diff --git a/openscad.pro b/openscad.pro
index 048fbb5..700c392 100644
--- a/openscad.pro
+++ b/openscad.pro
@@ -17,6 +17,7 @@ isEmpty(QT_VERSION) {
error("Please use qmake for Qt 4 (probably qmake-qt4)")
}
+
# Auto-include config_<variant>.pri if the VARIANT variable is give on the
# command-line, e.g. qmake VARIANT=mybuild
!isEmpty(VARIANT) {
@@ -104,10 +105,6 @@ netbsd* {
QMAKE_CXXFLAGS *= -fno-strict-aliasing
}
-CONFIG(mingw-cross-env) {
- include(mingw-cross-env.pri)
-}
-
CONFIG(skip-version-check) {
# force the use of outdated libraries
DEFINES += OPENSCAD_SKIP_VERSION_CHECK
@@ -131,6 +128,11 @@ DEFINES += USE_PROGRESSWIDGET
include(common.pri)
+# mingw has to after other items so OBJECT_DIRS will work properly
+CONFIG(mingw-cross-env) {
+ include(mingw-cross-env.pri)
+}
+
win32 {
FLEXSOURCES = src/lexer.l
BISONSOURCES = src/parser.y
@@ -315,3 +317,4 @@ INSTALLS += applications
icons.path = $$PREFIX/share/pixmaps
icons.files = icons/openscad.png
INSTALLS += icons
+
diff --git a/scripts/mingw-x-build-dependencies.sh b/scripts/mingw-x-build-dependencies.sh
index 338051f..f60633b 100755
--- a/scripts/mingw-x-build-dependencies.sh
+++ b/scripts/mingw-x-build-dependencies.sh
@@ -45,9 +45,12 @@ echo NUMJOBS: $NUMJOBS
echo "Downloading MXE into " $MXEDIR
cd $BASEDIR
-git clone git://github.com/mxe/mxe.git
+if [ ! -e mxe ]; then
+ git clone git://github.com/mxe/mxe.git
+fi
cd $MXEDIR
+echo "make mpfr eigen opencsg cgal qt -j $NUMCPU JOBS=$NUMJOBS"
make mpfr eigen opencsg cgal qt -j $NUMCPU JOBS=$NUMJOBS
#make mpfr -j$NUMCPU JOBS=$NUMJOBS # for testing
echo 'make'
@@ -55,13 +58,16 @@ echo 'make'
echo "leaving" $MXEDIR
echo "entering $OPENSCADDIR"
cd $OPENSCADDIR
-if [ ! -e mingw-cross-env ]; then
- ln -s $MXEDIR mingw-cross-env
+if [ -e mingw-cross-env ]; then
+ rm ./mingw-cross-env
fi
+echo "linking mingw-cross-env directory"
+ln -s $MXEDIR/usr/i686-pc-mingw32/ ./mingw-cross-env
echo
echo "now copy/paste the following to cross-build openscad"
echo
+echo "export PATH=$MXEDIR/usr/bin:\$PATH"
echo "i686-pc-mingw32-qmake CONFIG+=mingw-cross-env openscad.pro"
echo "make"
echo
contact: Jan Huwald // Impressum