[Interest] current importance/interest of QTDIR?

René J.V. Bertin rjvbertin at gmail.com
Tue Feb 17 11:01:24 CET 2015


Hello,

I've gotten queries like the ones copied below, in the context of my efforts to provide co-installable Qt4 and Qt5 installations in MacPorts. See also the outputs of qmake -query below.

I seem to recall that at some point (Qt 2 ? Qt 3?) one could hardly get away from setting QTDIR even for running Qt applications built against a single Qt version. The online documentation still refers to QTDIR, but the variable doesn't appear to be set even in my Linux/KDE desktop and I haven't had to use it on OS X either (IIRC I've even had a left-over QTDIR pointing to a Qt 3 install for a while). How up-to-date is that online documentation w.r.t. its references to QTDIR?

Also, is it required to configure Qt with a single -prefix=Foo for QTDIR to make sense (see question 2 in the forwarded message below)? If so, I suppose one could write a script that sets up a collection of symlinks in a directory of choice so that QTDIR can be set to that "shadow bundle". Before I roll my own, does something like that exist already?

Thanks,
René

%> qmake -qt=qt4 -query
QT_INSTALL_PREFIX:/opt/local/libexec/qt4
QT_INSTALL_DATA:/opt/local/share/qt4
QT_INSTALL_DOCS:/opt/local/share/doc/qt4
QT_INSTALL_HEADERS:/opt/local/include/qt4
QT_INSTALL_LIBS:/opt/local/libexec/qt4/lib
QT_INSTALL_FRAMEWORKS:/opt/local/libexec/qt4/Library/Frameworks
QT_INSTALL_BINS:/opt/local/libexec/qt4/bin
QT_INSTALL_PLUGINS:/opt/local/share/qt4/plugins
QT_INSTALL_IMPORTS:/opt/local/share/qt4/imports
QT_INSTALL_TRANSLATIONS:/opt/local/share/qt4/translations
QT_INSTALL_CONFIGURATION:/opt/local/etc/qt4
QT_INSTALL_EXAMPLES:/opt/local/share/qt4/examples
QT_INSTALL_DEMOS:/opt/local/share/qt4/demos
QMAKE_MKSPECS:/opt/local/share/qt4/mkspecs
QMAKE_VERSION:2.01a
QT_VERSION:4.8.6

%> qmake -qt=qt5 -query
INCLUDEPATH:/opt/local/include
INCPATH:/opt/local/include
QMAKE_LIBDIR:/opt/local/lib
QT_SYSROOT:
QT_INSTALL_PREFIX:/opt/local
QT_INSTALL_ARCHDATA:/opt/local/libexec/qt5
QT_INSTALL_DATA:/opt/local/share/qt5
QT_INSTALL_DOCS:/opt/local/share/doc/qt5
QT_INSTALL_HEADERS:/opt/local/include/qt5
QT_INSTALL_LIBS:/opt/local/libexec/qt5/Library/Frameworks
QT_INSTALL_LIBEXECS:/opt/local/libexec/qt5/libexec
QT_INSTALL_BINS:/opt/local/libexec/qt5/bin
QT_INSTALL_TESTS:/opt/local/share/qt5/tests
QT_INSTALL_PLUGINS:/opt/local/share/qt5/plugins
QT_INSTALL_IMPORTS:/opt/local/share/qt5/imports
QT_INSTALL_QML:/opt/local/share/qt5/qml
QT_INSTALL_TRANSLATIONS:/opt/local/share/qt5/translations
QT_INSTALL_CONFIGURATION:/opt/local/etc/qt5
QT_INSTALL_EXAMPLES:/Applications/MacPorts/Qt5/examples
QT_INSTALL_DEMOS:/Applications/MacPorts/Qt5/examples
QT_HOST_PREFIX:/opt/local
QT_HOST_DATA:/opt/local/share/qt5
QT_HOST_BINS:/opt/local/libexec/qt5/bin
QT_HOST_LIBS:/opt/local/libexec/qt5/Library/Frameworks
QMAKE_SPEC:macx-clang
QMAKE_XSPEC:macx-clang
QMAKE_VERSION:3.0
QT_VERSION:5.4.0

----------  Forwarded Message  ----------

    2. IF I install qt4-mac +concurrent, what two values do I use for setting
        $QTDIR to pick up either qt4-mac +concurrent or qt5-mac-devel in my
        non-MacPorts development areas for KDE 4 and KF5/Frameworks?
        I am still not convinced about your installation strategy [2]: in fact I have
        no idea where qt5-mac-devel has been installed.  There seem to be
        bits of it (links to a Library/Frameworks area) in different places under
        /opt/local.

...

Why cannot we install into something like /optlocal/qt4 and /opt/local/qt5,
or ditto, but one subdir down from /opt/local?




More information about the Interest mailing list