summaryrefslogtreecommitdiffstats
path: root/cmake/QtQmakeHelpers.cmake
Commit message (Collapse)AuthorAgeFilesLines
* CMake: Remove outdated TODO commentsJoerg Bornemann2020-10-301-2/+2
| | | | | | | | We do not have host-specific INSTALL_*DIR variables in the CMake build. It is equivalent to a qmake build with host prefix = prefix. Change-Id: I65731e6038508b6c28e3f2819b624ba19abfc82a Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
* CMake: Write INSTALL_MKSPECSDIR to qconfig.cppJoerg Bornemann2020-10-301-1/+7
| | | | | | | | | The value of this variable - whithout the mkspecs part - is what's called the host data dir in Qt5. Fixes: QTBUG-87681 Change-Id: I3dfeed17e8a614476aef4d9c651a141ce62e6551 Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
* CMake: Fix automatic sysrootification detection for qmakeAlexandru Croitor2020-10-261-10/+16
| | | | | | | | | | | | | | | | | | | | | The way we detected whether SysrootifyPrefix needs to be set was incorrect. We checked if extprefix == prefix => SysrootifyPrefix should be true. But that was previously always the case for a non-prefix build, which means it was not possible to build apps (due to qmake expecting to find include dirs in the sysroot, despite the non-prefix Qt not being installed anywhere into the sysroot). Instead we should do what qmake does. Only set SysrootifyPrefix to true if extprefix was not provided and a sysroot is available. To make it work for iOS and Android, the sysroot detection code had to be moved earlier than the SysrootifyPrefix detection. Task-number: QTBUG-86053 Change-Id: Idcc1260a675fb2ef9ae27fc9dc42a68b30f763b8 Reviewed-by: Cristian Adam <cristian.adam@qt.io>
* CMake: Fix creation of host-qmake wrapper when cross-compilingAlexandru Croitor2020-08-231-1/+2
| | | | | | | | | The -host prefix was added to the 'preliminary' directory rather than the actual wrapper shell script. This caused it to be overwritten every time by the cross-compiled qmake binary. Change-Id: I103811c6aa9181fa701e3e7ecaf828ecdd1e3c90 Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
* CMake: Handle -D, -I, -F and -L configure argumentsJoerg Bornemann2020-08-171-0/+15
| | | | | | | | | | | | | | Introduce new CMake variables and map -D to QT_EXTRA_DEFINES, -I to QT_EXTRA_INCLUDEPATHS, -L to QT_EXTRA_LIBDIRS, and -F to QT_EXTRA_FRAMEWORKPATHS. Those variables only affect the Qt build, not user projects. Fixes: QTBUG-85878 Change-Id: I229df2eed1505a2619068d0d32975962b052569a Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
* CMake: Split QtBuild.cmake into smaller filesAlexandru Croitor2020-08-141-0/+208
QtBuild.cmake is huge. Split it. Move module, plugin, tools, executables and test related functions out of QtBuild.cmake into separate files. Do the same for many other things too. An additional requirement is that all the new Helpers files only define functions and macros. No global variable definitions are allowed, nor execution of commands with side effects. Some notes: qt_install_qml_files is removed because it's dead code. Some functions still need to be figured out, because they are interspersed and depend on various global state assignments. Task-number: QTBUG-86035 Change-Id: I21d79ff02eef923c202eb1000422888727cb0e2c Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>