summaryrefslogtreecommitdiffstats
path: root/qmake
Commit message (Collapse)AuthorAgeFilesLines
* Merge remote-tracking branch 'origin/wip/qt6' into wip/cmakeAlexandru Croitor2019-06-146-6/+8
|\ | | | | | | | | | | | | | | | | | | This changes many different CMake places to mention Qt6 instead of Qt5. Note that some old qt5 cmake config files in corelib are probably not needed anymore, but I still renamed and kept them for now. Change-Id: Ie69e81540386a5af153f76c0242e18d48211bec4
| * Remove QLatin1Literal usagesGiuseppe D'Angelo2019-06-101-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | That's an undocumented Qt 4/3/2 remnant, start remove usages. Fix incorrect include header in qclass_lib_map.h as a drive-by. Change-Id: I939be2621bc03e5c75f7e3f152546d3af6d37b91 Reviewed-by: Marc Mutz <marc.mutz@kdab.com> Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
| * Separate out the time, zone, date code from corelib/tools/Edward Welbourne2019-06-062-2/+5
| | | | | | | | | | | | | | | | | | | | We'll be adding calendar code here as well, and tools/ was getting rather crowded, so it looks like time to move out a reasonably coherent sub-bundle of it all. Change-Id: I7e8030f38c31aa307f519dd918a43fc44baa6aa1 Reviewed-by: Lars Knoll <lars.knoll@qt.io>
| * Do not "fixify" the content of extra compiler input variables twiceJoerg Bornemann2019-06-041-1/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | MakefileGenerator::initOutPaths should only do that: init out paths. It's not supposed to modify the content of input variables for extra compilers. Those get "fixed" in MakefileGenerator::init below the "do the path fixifying" comment. The first "fixifying" would turn an absolute path in SOURCES (input variable for the moc_source extra compiler) into a path relative to the output directory. The second "fixifying" would mess everything up. Fixes: QTBUG-76097 Change-Id: I8c50ef33d097dba4a1db76144c70b0677beffb6c Reviewed-by: Kai Koehne <kai.koehne@qt.io>
* | Revert "cmake: Make CMake superbuilds work"Alexandru Croitor2019-06-141-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | Builds fail on Windows, due to splitting on ':' on absolute file paths, when handling syncqt injections. Revert for now to get qt6 merge in faster. This reverts commit 7559d508d1993dd90a4939441eaf353d55462ae5. Change-Id: If139a8a1eb4ae7ccc8d7b835b12e83b03176e28b Reviewed-by: Tobias Hunger <tobias.hunger@qt.io> Reviewed-by: Qt CMake Build Bot
* | cmake: Make CMake superbuilds workKevin Funk2019-06-141-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | In case of a CMake superbuild, the actual install root in a non-prefix build is the top-level build directory (not $TOP_BUILDDIR/qtbase anymore). This is more in line how CMake lays out things by default. Task-number: QTBUG-75582 Change-Id: I4e1744b5c877508fedc33e237eec28cb7436010b Reviewed-by: Qt CMake Build Bot Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io> Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* | Automatically find apple frameworks when building a repoAlexandru Croitor2019-06-131-2/+0
| | | | | | | | | | | | | | | | | | Instead of doing it just in qtbase/src, we need to do it for all repos before building ./src. Change-Id: I57f226b849cd5370ffbbbea8a694697d400957a4 Reviewed-by: Leander Beernaert <leander.beernaert@qt.io> Reviewed-by: Liang Qi <liang.qi@qt.io>
* | cmake: Add warnings_are_errors optionAlbert Astals Cid2019-06-054-4/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | for modules, plugins and tools only (i.e. no tests nor examples) this mimics the qmake behavior default value is developer_build Comes with some fixes in qmake since it seems in the qmake built it was not having Werror, now does because we built it with add_qt_tool Change-Id: I6f3237f25a6fedefa958644929e90f13837a12df Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
* | Merge remote-tracking branch 'origin/dev' into wip/cmakeAlexandru Croitor2019-06-038-99/+68
|\| | | | | | | Change-Id: Ide5b3408bfefca410323cf26b810b44c06d3a227
| * Remove unneeded qstring_compat.cpp from the qmake buildJoerg Bornemann2019-05-293-11/+2
| | | | | | | | | | | | | | Change-Id: Ie25aca49e8ff6a7aeb50dd77c36e5e1391d9c00e Reviewed-by: Edward Welbourne <edward.welbourne@qt.io> Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
| * De-duplicate code for calling extra compiler depend_commandJoerg Bornemann2019-05-292-76/+56
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Flesh out copy-and-pasted code into a function and adjust the coding style on the go. Change-Id: I9b8a87d6dd5c33cc1ed9f613fe85daca52309369 Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
| * Do not ignore exit codes of install commandsJoerg Bornemann2019-05-232-10/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | All calls to QINSTALL or QINSTALL_PROGRAM were written into Makefiles with a preceding dash which lets make ignore the command's exit code. Scripts (and users) calling 'make install' had no way to determine if an installation completely succeeded, unless they inspected make's output or the installation tree. Remove the leading dash from those commands to stop 'make install' on failure. Users who really want to ignore the exit codes can run 'make -k install'. [ChangeLog][qmake] Installation targets do not ignore the exit code of QINSTALL and QINSTALL_PROGRAM anymore. Fixes: QTBUG-18870 Change-Id: I7c072c896e6bd2b2ddba4b9c082c5bf627c90f50 Reviewed-by: Lars Knoll <lars.knoll@qt.io> Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* | Merge remote-tracking branch 'origin/dev' into wip/cmakeAlexandru Croitor2019-06-0335-414/+619
|\| | | | | | | | | | | Take 5. Change-Id: Ifb2d20e95ba824e45e667fba6c2ba45389991cc3
| * Sequentialize install targets in debug_and_release buildsJoerg Bornemann2019-05-241-3/+36
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Debug/release install targets can potentially install the same files which leads to errors on install when running make with -j > 1. If build_all is set, make the 'install' dependent of the new target 'debug-release-install' which contains the commands of 'debug-install' and 'release-install'. Of course, debug/release is not hard-coded, but the content of the BUILDS variable is used. Change-Id: I67b504a95b83daf43bc89dcc0e3391b67e19c027 Reviewed-by: Christian Kandeler <christian.kandeler@qt.io> Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
| * Merge remote-tracking branch 'origin/5.13' into devFriedemann Kleint2019-05-272-16/+11
| |\ | | | | | | | | | Change-Id: Ia279fc4a8226626041c772902a07b2f90f37b53b
| | * Merge remote-tracking branch 'origin/5.12' into 5.13Friedemann Kleint2019-05-271-14/+8
| | |\ | | | | | | | | | | | | Change-Id: Iaf6bd52972b562b9c91d9e93a988d26b0eb9d3b4
| | | * Use appropriate encoding rather than UTF-8 when reading from a pipeEdward Welbourne2019-05-241-14/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The qmake code to read output from dependency-generation was adding QByteArray values to a QString, thereby tacitly converting from UTF-8; this is misguided. Hopefully, the command emits its output in the same local 8-bit encoding that QString knows to convert from. Simplified needlessly verbose loops (that violated Qt coding style) in the process. Fixes: QTBUG-75904 Change-Id: I27cf81ffcb63ebc999b8e4fc57abdb9a68c4d2b3 Reviewed-by: Jörg Bornemann <joerg.bornemann@qt.io>
| | * | doc: Explain how qmake finds for files included in your source codeKavindra Palaraja2019-05-161-2/+3
| | | | | | | | | | | | | | | | | | | | | | | | Task-number: QTBUG-26651 Change-Id: Icc09e3272fcec8af0c33d79655159d13183c66ce Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
| * | | qmake: remove use of Java-style iteratorsMarc Mutz2019-05-211-3/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | They will be deprecated, so qmake wouldn't compile anymore. Change-Id: I42212fdf213df696d736ed34458f7e79bd902dd5 Reviewed-by: Jörg Bornemann <joerg.bornemann@qt.io>
| * | | Deduplicate initialization code for default variablesJoerg Bornemann2019-05-162-23/+16
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Use the writeDefaultVariables method also for the Win32MakeFileGenerator. Remove the initializations that are already done in Makefile::writeDefaultVariables. Change-Id: I590cc5d7031de67dd830e6113849ab080dbf2325 Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
| * | | Clean up class definitions of makefile generatorsJoerg Bornemann2019-05-1614-82/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Remove pointless constructors and destructors. Change-Id: I7aea8587bf3598b6f5324aac8898edf227475d63 Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
| * | | Merge remote-tracking branch 'origin/5.13' into devLiang Qi2019-05-151-0/+3
| |\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: src/corelib/global/qfloat16.cpp src/corelib/global/qfloat16.h src/plugins/platforms/windows/qwindowswindow.cpp Change-Id: I0938aaa6a9771f55e48c95ed29f6f5291431b947
| | * | Add the c++latest CONFIG value to select the latest C++ standardJoerg Bornemann2019-05-141-0/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | [ChangeLog][qmake] The CONFIG value c++latest was added to select the latest C++ standard the currently used toolchain supports. Task-number: QTBUG-75653 Change-Id: I22ddc9d293109d99e652b7ccb19d7226fca4716d Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
| * | | qmake: replace QLinkedList with std::listMarc Mutz2019-05-135-15/+11
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This is in preparation of deprecating QLinkedList. There is but one substantial change: Instead of copying the linked list, we move it now, and instead of copying items between these two lists, we use std::list::splice(), which just relinks nodes. It is a bit surprising that the comment on the ProValueMapStack suggests references into the container must remain stable, and then some code changes addresses by making copies of the elements. This was probably a bug waiting to manifest itself. Since nothing else in qmake is using QLinkedList now, remove qlinkedlist.o from the qmake build. Change-Id: I08a5b0661466bf50ad8f9f8abf58bc801aef4ddc Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
| * | | qmake: use std names on a linked listMarc Mutz2019-05-135-25/+25
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This is preparation of moving from QLinkedList to std::list, which is in preparation of deprecating QLinkedList. Change-Id: Ief259bc8c7178be5ca04812c6890cf65d86c069d Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
| * | | Merge remote-tracking branch 'origin/5.13' into devLiang Qi2019-05-132-2/+15
| |\| | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: src/corelib/tools/qstring.cpp Change-Id: I81dbf90fc936c9bf08197baefa071117bddb1c63
| | * | Merge remote-tracking branch 'origin/5.12' into 5.13Qt Forward Merge Bot2019-05-092-2/+12
| | |\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: src/corelib/tools/qlocale_data_p.h (Regenerated by running the scripts in util/local_database/) src/gui/opengl/qopengltextureuploader.cpp Done-With: Edward Welbourne <edward.welbourne@qt.io> Done-With: Allan Sandfeld Jensen <allan.jensen@qt.io> Change-Id: I12df7f066ed0a25eb109f61c4b8d8dea63b683e2
| | | * qmake: Document DESTDIR deficienciesKai Koehne2019-05-081-0/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Fixes: QTBUG-75261 Change-Id: I8d0635a914785171cdee1bf691f773d4c356c6c1 Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io> Reviewed-by: Leena Miettinen <riitta-leena.miettinen@qt.io>
| | | * qmake: Distinguish local header files by directory and nameMatthias Doerfel2019-05-071-2/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Information about header files is cached by qmake. The key is the filename of the #include directive. For system includes (<stdio.h>) this is unique, according to the search order in INCLUDE_PATH. For local includes, given as "foo.h", there may be name collisions. Usually a compiler first searches in the directory of the current file (stored in the sourceDir variable), and only in case of a miss the INCLUDE_PATH is considered. The dependency generation now distinguishes local header files by their full relative path. This is implemented by forcing the use of the full relative path as key into the SourceFiles data structure if the flag try_local is set. Change-Id: Ifd75325b53496824054595f7fc98d71bbd9d8aa6 Fixes: QTBUG-72383 Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
| | * | Doc: Document the c++2a CONFIG valueJoerg Bornemann2019-05-081-0/+3
| | | | | | | | | | | | | | | | | | | | Change-Id: Ia4d84ac141b6fb27b244dfb8272b8039e337a9e4 Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
| * | | Deprecate conversion functions between QList and QSetLars Knoll2019-05-072-2/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Users should use range constructors instead to do the conversion. Keep conversion methods between QList and QVector as these will turn into a no-op in Qt 6, whereas forcing people to use range constructors would lead to deep copies of the data. Change-Id: Id9fc9e4d007044e019826da523e8418857c91283 Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
| * | | Merge remote-tracking branch 'origin/5.13' into devLiang Qi2019-05-071-1/+4
| |\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: src/corelib/kernel/qobject.cpp src/corelib/kernel/qvariant.h src/corelib/tools/qlist.h Done-With: Milian Wolff <milian.wolff@kdab.com> Done-With: Allan Sandfeld Jensen <allan.jensen@qt.io> Change-Id: I6803f7239aa137a51a7467fab7cc7a01302a848d
| | * | doc: Document the effect of *.qmake.cache properlyKavindra Palaraja2019-04-291-1/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Added a sentence to explain how a .qmake.cache file influences the project root. Task-number: QTBUG-21411 Change-Id: I97766edd96851f1c988ab07f842fb81a339e4ecd Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
| * | | Prefix textstream operators with Qt::Lars Knoll2019-05-029-255/+255
| | | | | | | | | | | | | | | | | | | | | | | | | | | | As the non prefixed variants are deprecated Change-Id: I2ba09d71b9cea5203b54297a3f2332e6d44fedcf Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
| * | | Merge remote-tracking branch 'origin/5.13' into devQt Forward Merge Bot2019-04-271-0/+2
| |\| | | | | | | | | | | | | | Change-Id: I1c9449ab064deed1367a7e5dbedfcb489f28140e
| | * | Merge remote-tracking branch 'origin/5.12' into 5.13Qt Forward Merge Bot2019-04-261-0/+2
| | |\| | | | | | | | | | | | | Change-Id: I6ecf7074eda57ef4954fb3fdc7a6d1e8cd229340
| | | * Doc: Document qmake's plugin_bundle CONFIG valueJoerg Bornemann2019-04-241-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Fixes: QTBUG-17171 Change-Id: I05bf6ba7498fb05394ff8c118973da2b0dbe4fc3 Reviewed-by: Kavindra Palaraja <kpalaraja@luxoft.com> Reviewed-by: Leena Miettinen <riitta-leena.miettinen@qt.io> Reviewed-by: Kai Koehne <kai.koehne@qt.io>
| * | | Merge remote-tracking branch 'origin/5.13' into devLiang Qi2019-04-244-0/+69
| |\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: src/gui/util/qshaderformat.cpp src/gui/util/qshaderformat_p.h src/widgets/graphicsview/qgraphicsitem_p.h Change-Id: Idafd88eb9a0a15b4af29f6143d009c1ec8ceecca
| | * | Merge remote-tracking branch 'origin/5.12' into 5.13Qt Forward Merge Bot2019-04-244-0/+33
| | |\| | | | | | | | | | | | | Change-Id: I26da00aa71b0f0b91c9bfb4a9e8550345ee62875
| | | * Teach qmake MSVC's compiler options /std:c++[14|17|latest]Joerg Bornemann2019-04-233-0/+11
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This fixes the "could not parse compiler option" warning when generating VS project files. Fixes: QTBUG-75275 Change-Id: Idd98ae5fdb8ebf5a4e311cbb6cd3ed1daba74ca4 Reviewed-by: Kai Koehne <kai.koehne@qt.io>
| | | * Doc: Document QMAKE_[L|C[XX]]FLAGS_RELEASE_WITH_DEBUGINFOJoerg Bornemann2019-04-181-0/+22
| | | | | | | | | | | | | | | | | | | | | | | | Fixes: QTBUG-17463 Change-Id: Ic2f0870da14db21b1da053716b6d63ba0ed679c9 Reviewed-by: Leena Miettinen <riitta-leena.miettinen@qt.io>
| | * | doc: Explain the config members for INSTALLSKavindra Palaraja2019-04-231-0/+35
| | | | | | | | | | | | | | | | | | | | | | | | Task-number: QTBUG-3209 Change-Id: I00f181a9f29d4ae440a9ad6a2d99877cab482db8 Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
| | * | doc: Add clang to the Unix list for Precompiled Headers documentationv5.13.0-beta3Kavindra Palaraja2019-04-151-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | Task-number: QTBUG-50011 Change-Id: I18261e62e387eeb74fc7584bf034a11ac75db1be Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
| * | | QRegExp include cleanupSamuel Gaist2019-04-197-5/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | QRegExp includes can be found in several files where there's not even a use of the class. This patch aims to avoid needless includes as well as follow the "include only what you use" moto. This patch removes a QRegExp include from the QStringList header which means that there is likely going to be code breaking since QStringList is used in many places and would get QRegExp in. [ChangeLog][Potentially Source-Incompatible Changes] qstringlist.h no longer includes qregexp.h. Change-Id: I32847532f16e419d4cb735ddc11a26551127e923 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* | | | Allow building the tests directory as a standalone CMake projectAlexandru Croitor2019-05-221-3/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | At the moment, Coin builds tests as a separate qmake invocation against an installed Qt. We need to support the same with CMake. Change the tests subdirectory to be a standalone CMake project when CMake does not detect an existing QtTest target while processing the subdirectory. If the target exists, it means we are building the whole repo, if the target does not exist, we need to call find_package to find the installed Qt. Refactor and move around a few things to make standalone tests build successfully: - add a new macro to set up paths to find QtSetup - add a new macro to find all macOS frameworks - add a new macro to set up building tests - add a new macro that actually builds the tests - export the INSTALL_CMAKE_NAMESPACE value into the BuildInternals Config file - export the CMAKE_BUILD_TYPE value, because a test project doesn't have a .git subdir and thus defaults to be built in Release mode, even though qtbase might have been built in Debug, so to avoid the mixing, the propagate the build type - stop overriding INSTALL_CMAKE_NAMESPACE and QT_CMAKE_EXPORT_NAMESPACE inside QtSetup if they are set, because the tests project doesn't specify a major version, and if we override the values, the moc / uic targets don't get the correct major version prefix and configuration fails Change-Id: Ibdb03687302567fe325a15f6d1cb922c76240675 Fixes: QTBUG-75090 Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* | | | Implement developer / non-prefix buildsAlexandru Croitor2019-05-151-2/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | A non-prefix build is a build where you don't have to run make install. To do a non-prefix build, pass -DFEATURE_developer_build=ON when invoking CMake on qtbase. Note that this of course also enables developer build features (private tests, etc). When doing a non-prefix build, the CMAKE_INSTALL_PREFIX cache variable will point to the qtbase build directory. Tests can be run without installing Qt (QPA plugins are picked up from the build dir). This patch stops installation of any files by forcing the make "install" target be a no-op. When invoking cmake on the qtsvg module (or any other module), the CMAKE_INSTALL_PREFIX variable should be set to the qtbase build directory. The developer-build feature is propagated via the QtCore Config file, so that when building other modules, you don't have to specify it on the command line again. As a result of the change, all libraries, plugins, tools, include dirs, CMake Config files, CMake Targets files, Macro files, etc, will be placed in the qtbase build directory, mimicking the file layout of an installed Qt file layout. Only examples and tests are kept in the separate module build directories, which is equivalent to how qmake does it. The following global variables contain paths for the appropriate prefix or non prefix builds: QT_BUILD_DIR, QT_INSTALL_DIR, QT_CONFIG_BUILD_DIR, QT_CONFIG_INSTALL_DIR. These should be used by developers when deciding where files should be placed. All usages of install() are replaced by qt_install(), which has some additional logic on how to handle associationg of CMake targets to export names. When installing files, some consideration should be taken if qt_copy_or_install() needs to be used instead of qt_install(), which takes care of copying files from the source dir to the build dir when doing non-prefix builds. Tested with qtbase and qtsvg, developer builds, non-developer builds and static developer builds on Windows, Linux and macOS. Task-number: QTBUG-75581 Change-Id: I0ed27fb6467662dd24fb23aee6b95dd2c9c4061f Reviewed-by: Kevin Funk <kevin.funk@kdab.com> Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
* | | | Export tool config and target files for each relevant moduleAlexandru Croitor2019-05-021-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | CMake will now generate config and target files for each module that provides tools. As a result, namespaced global targets such as Qt5::moc or Qt5::rcc can be made available. Third party projects that require just these tools, and not the Qt modules themselves, should specify CMAKE_PREFIX_PATH pointing to the installed Qt location, and call find_package(Qt5CoreTools), find_package(Qt5GuiTools), etc. It is also possible to call find_package(Qt5Tools REQUIRED Core Widgets) where the last option is a list of modules whose tools should be imported. Note that all the tools are in the Qt5:: namespace and not in the Qt5CoreTools:: or Qt5WidgetsTools:: namespace. This commit also changes the behavior regarding when to build tools while building Qt itself. When cross compiling Qt (checked via CMAKE_CROSSCOMPILING) or when -DQT_FORCE_FIND_TOOLS=TRUE is passed, tools added by add_qt_tool will always be searched for and not built. In this case the user has to specify the CMake variable QT_HOST_PATH pointing to an installed host Qt location. When not cross compiling, tools added by add_qt_tool are built from source. When building leaf modules (like qtsvg) that require some tool that was built in qtbase (like moc), the module project should contain a find_package(Qt5ToolsCore) call and specify an appropriate CMAKE_PREFIX_PATH so that the tool package is found. Note that because HOST_QT_TOOLS_DIRECTORY was replaced by QT_HOST_PATH, the ensure syncqt code was changed to make it work properly with both qtbase and qtsvg. Here's a list of tools and their module associations: qmake, moc, rcc, tracegen, qfloat16-tables, qlalr -> CoreTools qvkgen -> GuiTools uic -> WidgetTools dbus related tools -> DBusTools Task-number: QTBUG-74134 Change-Id: Ie67d1e2f8de46102b48eca008f0b50caf4fbe3ed Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
* | | | Fix qmake build after no longer linking against QtCoreAlexandru Croitor2019-04-291-2/+8
| | | | | | | | | | | | | | | | | | | | Change-Id: I264195ac6e896dd72656afbec2329ae0f1a8bc82 Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
* | | | CMake: Do not link qmake against Qt (not even the bootstrap one)Tobias Hunger2019-04-291-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Qmake should not rebuild all the code in QtCore, but currently it does. When linking against QtCore, all the symbols get duplicated. A clever linker will "deduplicate" the symbols again, so this actually works with shared Qt builds, but it fails for static builds. Do not rely on the linker being clever and just do not link Qt at all for qmake. Change-Id: I0f79ed9176a19ee884dd425e5f23c26cf69dc422 Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
* | | | Merge commit 'dev' into 'wip/cmake-merge'Tobias Hunger2019-04-1634-596/+695
|\| | | | | | | | | | | | | | | Change-Id: I176c40d031be26a1dd1cf08843e448a660598783