diff options
-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) |