[KDE/Mac] QStandardPaths possible solution

David Faure faure at kde.org
Sun Jan 11 12:36:01 UTC 2015


On Sunday 11 January 2015 23:06:00 Ian Wadham wrote:
> Did you ever find out how Qt 4 and Qt 5 can be installed simultaneously
> in Linux?  People say it is not difficult.  But how exactly is it done? I
> don't have any idea, I am sorry to say.

The developer way: having Qt versions in different prefixes, and setting PATH to 
point to the right qmake and LD_LIBRARY_PATH to point to the right lib dir 
(and QT_PLUGIN_PATH to point to the right plugins dir), when choosing a 
specific version of Qt.
With this mechanism I have about 8 different versions of Qt side by side.

The distribution way: /usr/bin/qmake-qt4 and /usr/bin/qmake-qt5
(and a qmake symlink pointing to one or the other, configurable).
The corresponding libs have different names so they can cohabit in 
/usr/lib[64].
Plugins and other things are installed in version-specific dirs.
qmake-qt5 -query returns this (on opensuse) :

QT_SYSROOT:
QT_INSTALL_PREFIX:/usr
QT_INSTALL_ARCHDATA:/usr/lib64/qt5
QT_INSTALL_DATA:/usr/share/qt5
QT_INSTALL_DOCS:/usr/share/doc/packages/qt5
QT_INSTALL_HEADERS:/usr/include/qt5
QT_INSTALL_LIBS:/usr/lib64
QT_INSTALL_LIBEXECS:/usr/lib64/qt5/libexec
QT_INSTALL_BINS:/usr/lib64/qt5/bin
QT_INSTALL_TESTS:/usr/tests
QT_INSTALL_PLUGINS:/usr/lib64/qt5/plugins
QT_INSTALL_IMPORTS:/usr/lib64/qt5/imports
QT_INSTALL_QML:/usr/lib64/qt5/qml
QT_INSTALL_TRANSLATIONS:/usr/share/qt5/translations
QT_INSTALL_CONFIGURATION:/etc/xdg
QT_INSTALL_EXAMPLES:/usr/lib64/qt5/examples
QT_INSTALL_DEMOS:/usr/lib64/qt5/examples
QT_HOST_PREFIX:/usr
QT_HOST_DATA:/usr/lib64/qt5
QT_HOST_BINS:/usr/lib64/qt5/bin
QT_HOST_LIBS:/usr/lib64
QMAKE_SPEC:linux-g++
QMAKE_XSPEC:linux-g++
QMAKE_VERSION:3.0
QT_VERSION:5.3.2

Hope this helps,

-- 
David Faure, faure at kde.org, http://www.davidfaure.fr
Working on KDE Frameworks 5



More information about the kde-mac mailing list