#!/bin/bash QMAKE_XSPEC=$(qmake -query QMAKE_XSPEC) if [ "${QMAKE_XSPEC}" == "win32-g++" ]; then qmake "$@" LIBS+=-static-libgcc LIBS+=-static-libstdc++ else qmake "$@" LIBS+=-static fi