I don't know if it's really even possible (see related thread on this forum that had no replies), but the 4.8 documentation says that an environment variable "QMAKESPEC" can be set to specify mkspecs:
However, while qmake does not exist with an error, setting the QMAKESPEC environment doesn't seem to have any effect:The QMAKESPEC environment variable can contain any of the following:
A complete path to a directory containing a qmake.conf file. In this case qmake will open the qmake.conf file from within that directory. If the file does not exist, qmake will exit with an error.
Qt Code:
davethomaspilot@ubuntu:/usr/share/qt4/mkspecs/linux-arm-g++$ echo $QMAKESPEC /usr/share/qt4/mkspecs/linux-arm-g++ davethomaspilot@ubuntu:/usr/share/qt4/mkspecs/linux-arm-g++$ ls $QMAKESPEC qmake.conf qplatformdefs.h davethomaspilot@ubuntu:/usr/share/qt4/mkspecs/linux-arm-g++$ qmake -query QT_INSTALL_PREFIX:/usr QT_INSTALL_DATA:/usr/share/qt4 QT_INSTALL_DOCS:/usr/share/qt4/doc QT_INSTALL_HEADERS:/usr/include/qt4 QT_INSTALL_LIBS:/usr/lib/x86_64-linux-gnu QT_INSTALL_BINS:/usr/bin QT_INSTALL_PLUGINS:/usr/lib/x86_64-linux-gnu/qt4/plugins QT_INSTALL_IMPORTS:/usr/lib/qt4/imports QT_INSTALL_TRANSLATIONS:/usr/share/qt4/translations QT_INSTALL_CONFIGURATION:/etc/xdg QT_INSTALL_EXAMPLES:/usr/lib/qt4/examples QT_INSTALL_DEMOS:/usr/lib/qt4/demos QMAKE_MKSPECS:/usr/share/qt4/mkspecs QMAKE_VERSION:2.01a QT_VERSION:4.8.1To copy to clipboard, switch view to plain text mode
Here's what's in the qmake.conf in the directory specified by the QMAKESPEC env variable:
Can qmake be configured to use different mkspecs after being built?#
# qmake configuration for linux-g++
#
MAKEFILE_GENERATOR = UNIX
TARGET_PLATFORM = unix
TEMPLATE = app
CONFIG += qt warn_on release incremental link_prl gdb_dwarf_index
QT += core gui
QMAKE_INCREMENTAL_STYLE = sublib
include(../common/linux.conf)
include(../common/gcc-base-unix.conf)
include(../common/g++-unix.conf)
QMAKE_CC = $CROSS_COMPILE-gcc
QMAKE_CXX = $CROSS_COMPILE-g++
QMAKE_LINK = $CROSS_COMPILE-g++
QMAKE_LINK_SHLIB = $CROSS_COMPILE-g++
QMAKE_AR = $CROSS_COMPILE-ar cr
QMAKE_OBJCOPY = $CROSS_COMPILE-objcopy
QMAKE_STRIP = $CROSS_COMPILE-strip
QMAKE_LFLAGS_RELEASE = -Wl,-O1,-rpath $ROOTFS/usr/lib
QMAKE_INCDIR = $ROOTFS/usr/include
QMAKE_LIBDIR = $ROOTFS/usr/lib
QMAKE_INCDIR_X11 = $ROOTFS/usr/include
QMAKE_LIBDIR_X11 = $ROOTFS/usr/lib
QMAKE_INCDIR_OPENGL = $ROOTFS/usr/include
QMAKE_LIBDIR_OPENGL = $ROOTFS/usr/lib
load(qt_config)
davethomaspilot@ubuntu:/usr/share/qt4/mkspecs/linux-arm-g++$
Bookmarks