How to compile/link my apps with my Qt 6.7 installation?
-
I'm installing Qt 6.7.x on my ubuntu 22.04 system with online installer. I follow these installation instructions and at the end of the process have these subdirectories in my designated installation directory:
6.7.0/ dist/ Examples/ installer.dat junk Licenses/ MaintenanceTool.dat network.xml components.xml Docs/ InstallationLog.txt installerResources/ licenseInfo.txt MaintenanceTool* MaintenanceTool.ini Tools/
OK, but now how do I utilize these installed libraries and headers when building with cmake elsewhere on my system?
Thanks!
-
If you use QtCreator you should have a new Kit for that version. If not add a new Kit and configure it to use that Qt version.
-
If you use QtCreator you should have a new Kit for that version. If not add a new Kit and configure it to use that Qt version.
-
@jsulm I do not use qtcreator to build - just cmake from the command line.
In this case is there a cmake variable I should set to point at my Qt6 installation directory?
Thanks -
@Tom-asso Try to set qmake of the installed Qt6 to PATH, for example
export PATH=Qt6Path/bin/qmake6:$PATH
or
export PATH=Qt6Path/bin/qmake:$PATH
to use your Qt installation first. -
Hi,
You also have the option to call the qt-cmake wrapper that can be found in the bin folder of your Qt installation.
-
T Tom asso has marked this topic as solved on