Variable for Pro/Pri Files for Mingw Directory
We have a pri file for our Windows deployment. In this file we have this line to specify the directory of the Mingw directory:
QTDIR = C:\Qt\5.12.2\mingw73_64
This is used later like this:
deploy_script.extra = $$QTDIR/bin/windeployqt --release --qmldir qml/ $$INSTALL_BASE
The problem is that each time we update Qt say from 5.12.1 to 5.12.2 we have to remember to update the QDIR variable to match. Granted it may or may not cause issues as it is just the windeployqt utility, but in the past we have used this to copy DLLs or other specifics out of the mingw directory. I looked through here but could not find the variable I was looking for. I am just not sure what it would be called. If there is such a variable. I would think that there would be a way to construct that path. I mean the other build scripts seem to know where the chosen compiler is located.
I know, ask the question, then find it right after...
It took a trip to SO then back to qt docs to find this. QT_INSTALL_PREFIX is what I want. It has a bunch of other useful ones too. Use it like this:
QTDIR = $$[QT_INSTALL_PREFIX]
Or however you prefer.