diff options
author | Peter Kümmel <syntheticpp@gmx.net> | 2012-09-06 10:18:27 (GMT) |
---|---|---|
committer | Qt by Nokia <qt-info@nokia.com> | 2012-09-07 06:29:47 (GMT) |
commit | b2bf9266bf3f59edc3cf797331bd330bea52a8e6 (patch) | |
tree | db8dc1f427ad4188c8fa7eecc21a245e3be2c035 /mkspecs/win32-g++ | |
parent | 7d82bbb0d6b16356458eead0418e307ed92c79fa (diff) | |
download | Qt-b2bf9266bf3f59edc3cf797331bd330bea52a8e6.zip Qt-b2bf9266bf3f59edc3cf797331bd330bea52a8e6.tar.gz Qt-b2bf9266bf3f59edc3cf797331bd330bea52a8e6.tar.bz2 |
Add qmake CROSS_COMPILE variable via load(device_config)
The compiler prefix could be set optionally by CROSS_COMPILE.
Partial cherry pick from qtbase/2dc3181bdcc0d447d2bec42fa3b7cbecb640a51a
Change-Id: I9a9cc31d7c5fda8b33fe280ee2a90cda0196da7d
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@nokia.com>
Diffstat (limited to 'mkspecs/win32-g++')
-rw-r--r-- | mkspecs/win32-g++/qmake.conf | 20 |
1 files changed, 13 insertions, 7 deletions
diff --git a/mkspecs/win32-g++/qmake.conf b/mkspecs/win32-g++/qmake.conf index 2d37eed..d174634 100644 --- a/mkspecs/win32-g++/qmake.conf +++ b/mkspecs/win32-g++/qmake.conf @@ -3,8 +3,14 @@ # # Written for MinGW # +# Cross compile example for i686-w64-mingw32-g++: +# configure -xplatform win32-g++ -device-option CROSS_COMPILE=i686-w64-mingw32- +# MAKEFILE_GENERATOR = MINGW + +load(device_config) + TEMPLATE = app CONFIG += qt warn_on release link_prl copy_dir_files debug_and_release debug_and_release_target precompile_header QT += core gui @@ -14,7 +20,7 @@ QMAKE_COMPILER_DEFINES += __GNUC__ WIN32 QMAKE_EXT_OBJ = .o QMAKE_EXT_RES = _res.o -QMAKE_CC = gcc +QMAKE_CC = $${CROSS_COMPILE}gcc QMAKE_LEX = flex QMAKE_LEXFLAGS = QMAKE_YACC = byacc @@ -27,7 +33,7 @@ QMAKE_CFLAGS_RELEASE = -O2 QMAKE_CFLAGS_DEBUG = -g QMAKE_CFLAGS_YACC = -Wno-unused -Wno-parentheses -QMAKE_CXX = g++ +QMAKE_CXX = $${CROSS_COMPILE}g++ QMAKE_CXXFLAGS = $$QMAKE_CFLAGS QMAKE_CXXFLAGS_DEPS = $$QMAKE_CFLAGS_DEPS QMAKE_CXXFLAGS_WARN_ON = $$QMAKE_CFLAGS_WARN_ON @@ -50,8 +56,8 @@ QMAKE_RUN_CC_IMP = $(CC) -c $(CFLAGS) $(INCPATH) -o $@ $< QMAKE_RUN_CXX = $(CXX) -c $(CXXFLAGS) $(INCPATH) -o $obj $src QMAKE_RUN_CXX_IMP = $(CXX) -c $(CXXFLAGS) $(INCPATH) -o $@ $< -QMAKE_LINK = g++ -QMAKE_LINK_C = gcc +QMAKE_LINK = $${CROSS_COMPILE}g++ +QMAKE_LINK_C = $${CROSS_COMPILE}gcc QMAKE_LFLAGS = QMAKE_LFLAGS_EXCEPTIONS_ON = -mthreads QMAKE_LFLAGS_EXCEPTIONS_OFF = @@ -100,10 +106,10 @@ QMAKE_UIC = $$[QT_INSTALL_BINS]$${DIR_SEPARATOR}uic.exe QMAKE_IDC = $$[QT_INSTALL_BINS]$${DIR_SEPARATOR}idc.exe QMAKE_IDL = midl -QMAKE_LIB = ar -ru -QMAKE_RC = windres +QMAKE_LIB = $${CROSS_COMPILE}ar -ru +QMAKE_RC = $${CROSS_COMPILE}windres QMAKE_ZIP = zip -r -9 -QMAKE_STRIP = strip +QMAKE_STRIP = $${CROSS_COMPILE}strip QMAKE_STRIPFLAGS_LIB += --strip-unneeded load(qt_config) |