summaryrefslogtreecommitdiffstats
path: root/util
Commit message (Collapse)AuthorAgeFilesLines
* CMake: Remove old 3rdparty mechanism for harfbuzz-non-ngAlexandru Croitor2020-03-101-1/+0
| | | | | | Change-Id: I37c1e561ac83c51a06aae50ccb176094785d52f5 Reviewed-by: Leander Beernaert <leander.beernaert@qt.io> Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
* CMake: Remove old 3rdparty mechanism for double conversionAlexandru Croitor2020-03-103-4/+2
| | | | | | Change-Id: I2b20d4d9d95a1f7f59bc506046a1ebc20eb305f7 Reviewed-by: Leander Beernaert <leander.beernaert@qt.io> Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
* CMake: Add python version requirement note to pro2cmakeAlexandru Croitor2020-03-091-0/+3
| | | | | | Change-Id: Iccaf61e19fb7257ed21f656c287976d7d778ed1c Reviewed-by: Leander Beernaert <leander.beernaert@qt.io> Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
* CMake: Disable framework builds on macOS when target config is DebugAlexandru Croitor2020-03-091-1/+1
| | | | | | | | | | | | | | This prevents Coin from trying to automatically enable the framework feature when no configuration is specified on the command line. By default if no configuration is specified, and there's a .git subfolder, "Debug" will be the chosen config, and that would conflict with the framework feature, which would cause configuration to fail. Change-Id: Ia9db3e8178794737692307b4662a2e77cc574ccd Reviewed-by: Leander Beernaert <leander.beernaert@qt.io> Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io> Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
* CMake: Fix handling of QML_IMPORT_VERSION in pro2cmakeAlexandru Croitor2020-03-091-21/+27
| | | | | | Change-Id: Iaab6796204a6bb13b3d061d2589b2aebd4f342a8 Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io> Reviewed-by: Leander Beernaert <leander.beernaert@qt.io>
* CMake: Port most of the configure summary supportAlexandru Croitor2020-03-091-2/+124
| | | | | | | | | | | | | | | | | | | | | | | | | Teaches configurejson2cmake about summaries / reports, so things like enabled features, configure sections, notes, etc. Add relevant CMake API for adding summary sections and entries, as well as configure reports. The commands record the passed data, and the data is later evaluated when the summary needs to be printed. This is needed, to ensure that all features are evaluated by the time the summary is printed. Some report and summary entries are not generated if they mention a feature that is explicitly exclduded by configurejson2cmake's feature mapping dictionary. This is to prevent CMake from failing at configure time when trying to evaluate an unknown feature. We should re-enable these in the future. A few custom report types are skipped by configurejson2cmake (like values of qmake CONFIG or buildParts). These will have to be addressed a case-by-case basis if still needed. Change-Id: I95d74ce34734d347681905f15a781f64b5bd5edc Reviewed-by: Leander Beernaert <leander.beernaert@qt.io> Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
* CMake: Port the 'separate_debug_info' featureJoerg Bornemann2020-03-061-2/+0
| | | | | | | | | | | | | | | For this, we have to uninline the separate_debug_info configure test, because supporting the conversion of this in configurejson2cmake is not worth the hassle. Separate debug information can be turned on for a target by calling the function qt_enable_separate_debug_info. For Qt's shared libraries and tools separate debug information is generated if the 'separate_debug_info' feature is manually turned on. Change-Id: Ic2ffc15efef3794dc0aa42f3d853ef6d651a751c Reviewed-by: Leander Beernaert <leander.beernaert@qt.io> Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
* CMake: Fix condition of the 'debug' featureJoerg Bornemann2020-03-061-1/+1
| | | | | | | | For the moment, in feature conditions that use STREQUAL, the lhs must be a variable. Change-Id: I56fe24baeb8067662ea81984fd48383da4c5b67b Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
* Handle configure.json library testsLeander Beernaert2020-03-062-118/+197
| | | | | | | | | | | | | | | | | | | This patch updates configurejson2cmake.py to generate compile tests for library entries. The test also support the inherit keyword, which is currently limited to one level of inheritance. LibraryMapping has been extended with a test_library_overwrite as a means to overwrite the mapped library during a compile test. Certain tests such as openssl_headers form src/network are mapped with *_nolink libraries which do not exist when the test is run. Failing to do so will cause the test to run as it is skipped when the library target isn't found. To avoid redundant checks, the library tests need to be opt in by setting run_library_test to True on an instance of LibraryMapping. Change-Id: I607b24eda389fa67afad301c616e31bb7ab38d20 Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
* configurejson2cmake: Fix non-inline compile testsJoerg Bornemann2020-03-051-13/+10
| | | | | | | | | | If there's no test dir set, use "config.tests" as default value, and perform the check for the existence of CMakeLists.txt in configurejson2cmake, not the configure.cmake file. Change-Id: I8d3be8f2b68767c7592665c374022353c2dc6c57 Reviewed-by: Leander Beernaert <leander.beernaert@qt.io> Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
* configurejson2cmake: Fix compile tests without a "test" entryJoerg Bornemann2020-03-051-1/+4
| | | | | | | | | Set the default value of the "test" entry to the test's name like the qmake-based configure does. Change-Id: Ic1027c54c6312c47dca241dd7e3dc65b3e35d36f Reviewed-by: Leander Beernaert <leander.beernaert@qt.io> Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
* CMake: Port the 'force_debug_info' featureJoerg Bornemann2020-03-051-1/+3
| | | | | | | | | | This feature is read-only and is ON if CMAKE_BUILD_TYPE is RelWithDebInfo or if that value is in CMAKE_CONFIGURATION_TYPES. It mainly exists for the qmake support. Change-Id: I25cb57e832dcfcab100834a104b1a3d34f01086b Reviewed-by: Simon Hausmann <simon.hausmann@qt.io> Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
* CMake: Port the 'debug_and_release' featureJoerg Bornemann2020-03-051-1/+4
| | | | | | | | This feature is read-only. It's controlled by the multi-config feature of CMake. It mainly exists for the qmake support. Change-Id: I322459598fe92568eda4d42319ded444537e95d4 Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
* CMake: Port the 'shared' featureJoerg Bornemann2020-03-051-1/+1
| | | | | | | | This feature is read-only and supposed to be set by BUILD_SHARED_LIBS. It mainly exists for the qmake support. Change-Id: I722b0de53211d0aab1924e45a77120c890f31f50 Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
* CMake: Port the 'debug' featureJoerg Bornemann2020-03-051-1/+1
| | | | | | | | This feature is read-only and supposed to be set by variables like CMAKE_BUILD_TYPE. It mainly exists for the qmake support. Change-Id: Ic7e32cbda0f3c2d92dd446b07a3bf1a8d85ec3b9 Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
* Merge "Merge remote-tracking branch 'origin/5.15' into dev"Lars Knoll2020-03-043-11/+10
|\
| * Merge remote-tracking branch 'origin/5.15' into devLars Knoll2020-03-043-11/+10
| |\ | | | | | | | | | Change-Id: I99ee6f8b4bdc372437ee60d1feab931487fe55c4
| | * Rename the localexml module to qlocalexmlEdward Welbourne2020-03-033-4/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | It implements interaction with the QLocaleXML file format type, so rename it to match. Task-number: QTBUG-81344 Change-Id: I46302d4ac1038cdfc5929e73b554b6d793814c56 Reviewed-by: Lars Knoll <lars.knoll@qt.io>
| | * Rename the endonym members of the Locale typeEdward Welbourne2020-03-032-7/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | All other members had camelCase names, but the endonyms had prefix_endonym names, requiring munging where they were emitted to XML. So just do that munging upstream in the attribute name of the Locale objects. Makes no change to the data output by the scripts, not even to the intermediate QLocaleXML file. Task-number: QTBUG-81344 Change-Id: I01c15a822216281dc669b3e7ebda096d18b04f9b Reviewed-by: Lars Knoll <lars.knoll@qt.io> Reviewed-by: Cristian Maureira-Fredes <cristian.maureira-fredes@qt.io>
* | | CMake: Remove incorrect hardcoded harfbuzz conditionAlexandru Croitor2020-03-041-1/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | The non-system harfbuzz feature doesn't actually have a condition in the json file. Change-Id: I4b74915f28da97d6ef8f89690e91306d243913ee Reviewed-by: Leander Beernaert <leander.beernaert@qt.io> Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
* | | CMake: Fix stack-protector-strong test and featureJoerg Bornemann2020-03-041-1/+5
|/ / | | | | | | | | | | | | | | | | And in order to do this we must teach qt_config_compile_test a COMPILE_OPTIONS argument. Change-Id: I66fa45142b544e3a2fc599af1c1a4c69b442b318 Reviewed-by: Simon Hausmann <simon.hausmann@qt.io> Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
* | Merge remote-tracking branch 'origin/5.15' into devQt Forward Merge Bot2020-03-031-1/+1
|\| | | | | | | Change-Id: If36d96c0fef3de5ab6503977501c55c62a2ecc97
| * Use Qt::SplitBehavior in preference to QString::SplitBehaviorEdward Welbourne2020-02-281-1/+1
| | | | | | | | | | | | | | | | The Qt version was added in 5.14 "for use as eventual replacement for QString::SplitBehavior." Move another step closer to that goal. Change-Id: I399b5ea56e9255e775ca1746632f7421519a6616 Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
* | Correct pro2cmake's Requirements messageEdward Welbourne2020-02-281-1/+1
| | | | | | | | | | | | | | | | | | It only told me about two packages to install, so I got an error after I'd installed them and ran it, because I hadn't installed the rest. Save the next person an extra round-trip. Change-Id: I8b544fc2637b86656ec2adddce8e95e6e9e1daf5 Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
* | glgen: Fix endl warningsJohan Klokkhammer Helsing2020-02-281-169/+169
| | | | | | | | | | Change-Id: Ibb4fd83778a5d6c00cabae55c14ba3e771345aef Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io>
* | CMake: Port the reduce-relocations featureJoerg Bornemann2020-02-252-1/+15
| | | | | | | | | | | | | | | | | | | | As reduce-relocations implies bsymbolic_functions, we also add the -Bsymbolic-functions linker flag. Also, handle the .dynlist files that are passed to the linker by bsymbolic_functions.prf in the qmake build. Change-Id: I535c33fba888596d2f8975b16864bbe9f0a7caa4 Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
* | CMake: Allow building bundled 3rd party libraries in qtbaseAlexandru Croitor2020-02-253-31/+131
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | A few things are needed to accomplish that: - the python scripts do not ignore certain system_foo features anymore (it is a hardcoded list for now just to be safe) - configurejson2cmake now outputs qt_find_package(WrapSystemFoo) calls for bundled libraries (see below) - the harfbuzz .pro file is modified to accommodate pro2cmake not being able to correctly parse some conditional scopes - the freetype .pro file is modified to make sure linking of the library succeeds without duplicate symbol errors, which qmake doesn't encounter due to magical exclusion of cpp files that are included in other cpp files (presumably for include moc_foo.cpp support) - feature evaluation for Core, Gui, Network now happens in the qtbase/src directory, so that bundled libraries can be conditionally built - for each bundled library there are now two FindWrap scripts: - FindWrapSystemFoo which finds an installed library in the system - FindWrapFoo which either uses the system installed library or the built bundled one depending on a condition - projects that intend to use bundled libraries need to link against WrapFoo::WrapFoo instead of WrapSystemFoo::WrapSystemFoo targets (this is handled by pro2cmake). Unfortunately manually added qt_find_package(WrapFoo) calls might still be needed as is the case for WrapFreetype and others. - a new cmake/QtFindWrapHelper.cmake file is added that provides a macro to simplify creation of WrapFoo targets that link against a bundled or system library. The implementation is fairly ugly due to CMake macro constraints, but it was deemed better than copy-pasting a bunch of almost identical code across all FindWrapFoo.cmake files. - a qtzlib header-only module is now created when using bundled zlib, to provide public syncqt created headers for consumers that need them. These are projects that have 'QT_PRIVATE += zlib-private' in their .pro files (e.g. qtimageformats, qtlocation, qt3d, etc.) This is unfortunately needed due to QtNetwork using zlib types in its private C++ API. The change includes support for building the following bundled libraries: - zlib - libpng - libjpeg - Freetype - Harfbuzz-ng - PCRE2 The following 3rd party libraries are still using an old implementation within the CMake build system, and should be migrated to the new one in the near future: - double-conversion - Old harfbuzz The are a few libraries that are not yet ported: - system-sqlite - systemxcb - maybe others Among other things, this change allows building qtbase on Windows without requiring vcpkg. Task-number: QTBUG-82167 Change-Id: I35ecea0d832f66c1943c82e618de4a51440971a5 Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Simon Hausmann <simon.hausmann@qt.io> Reviewed-by: Leander Beernaert <leander.beernaert@qt.io>
* | CMake: Fix X11 and xkb library usage in the platform projectsAlexandru Croitor2020-02-251-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This is a prerequisite for building the bundled 3rd party libraries. Because the feature evaluation will be moved into src/CMakeLists.txt, some of the X11 packages were found in the src dir, and then a second time inside the x11-related projects. These qt_find_package calls in the x11 related projects tried to promote the imported targets to global, which failed, because they were created in a different directory scope. To avoid this, the special case qt_find_package calls are removed from the nested projects. Also, fix the mapping of some of the x11 libraries to be correct - xkbcommon_x11 was incorrectly mapped to XKB::XKB instead of the xkb common x11 library - xlib was mapped to xcb, whereas X11 is the correct CMake target Change-Id: I30781b2ecbdd478c98419b14baa0492037e49c61 Reviewed-by: Leander Beernaert <leander.beernaert@qt.io> Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* | Do not try to find .qmake.conf past the root directoryFrederik Gladhorn2020-02-211-0/+4
| | | | | | | | | | | | | | In case of .qmake.conf not existing, this would result in an infinite loop. Change-Id: I577aaed7a502efb7b01dc6b199dcf464358bf5a9 Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
* | Remove QUrl::topLevelDomainTimur Pocheptsov2020-02-201-1/+1
| | | | | | | | | | | | | | | | | | | | And move the actual implementation from corelib/io to network/kernel sub-module. Fixes: QTBUG-80308 Change-Id: I554b05bae3552c68e1e1a405c169366ee19120b2 Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io> Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
* | Move QOpenGLWidget from QtOpenGL to its own moduleJohan Klokkhammer Helsing2020-02-181-0/+1
| | | | | | | | | | | | | | | | Same pattern as QtQuickWidgets. Gets rid of QtOpenGL's dependency on QtWidgets. Task-number: QTBUG-74409 Change-Id: I4f9b55c23e25a1e0519734037b768a16e870c7d2 Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io>
* | Use char16_t in favor of ushort for locale data tablesEdward Welbourne2020-02-171-1/+1
| | | | | | | | | | | | Change-Id: I890dd2b52c1b786db1081744c8ca343baba93de4 Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* | Allow surrogate pairs for various "single character" locale dataEdward Welbourne2020-02-173-83/+44
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Extract the character in its proper unicode form and encode it in a new single_character_data table of locale data. Record each entry as the range within that table that encodes it. Also added an assertion in the generator script to check that the digits CLDR gives us are a contiguous sequence in increasing order, as has been assumed by the C++ code for some time. Lots of number-formatting code now has to take account of how wide the digits are. This leaves nowhere for updateSystemPrivate() to record values read from sys_locale->query(), so we must always consult that function when accessing these members of the systemData() object. Various internal users of these single-character fields need the system-or-CLDR value rather than the raw CLDR value, so move QLocalePrivate's methods to supply them down to QLocaleData and ensure they check for system values, where appropriate first. This allows us to finally support the Chakma language and script, for whose number system UTF-16 needs surrogate pairs. Costs 10.8 kB in added data, much of it due to adding two new locales that need surrogates to represent digits. [ChangeLog][QtCore][QLocale] Various QLocale methods that returned single QChar values now return QString values to accommodate those locales which need a surrogate pair to represent the (single character) return value. Fixes: QTBUG-69324 Fixes: QTBUG-81053 Change-Id: I481722d6f5ee266164f09031679a851dfa6e7839 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* | Merge remote-tracking branch 'origin/wip/cmake' into devAlexandru Croitor2020-02-132-1/+41
|\ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: tests/manual/rhi/hellominimalcrossgfxtriangle/CMakeLists.txt Hopefully final merge from wip/cmake, and then all cmake changes should target dev directly. Change-Id: I29b04c9b0284e97334877c77a32ffdf887dbf95b
| * \ Merge "Merge remote-tracking branch 'origin/dev' into wip/cmake" into wip/cmakeThe Qt Project2020-02-123-138/+179
| |\ \
| * | | Use INSTALL_QMLDIR instead of Qt6_DIR for qmltypes propertiesLeander Beernaert2020-02-121-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | Change-Id: Ic7e6230656670ebe925530eea5e34b16b6fea59b Reviewed-by: Qt CMake Build Bot Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
| * | | Add library mapping for QtShaderToolsMårten Nordheim2020-02-121-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | Change-Id: Ideefd13d75bdd4e0463c0f7b1e15c0781cfffe8c Reviewed-by: Qt CMake Build Bot Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
| * | | Add support for qt_helper_lib()Leander Beernaert2020-02-121-0/+39
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Add qt_add_3rdparty_library() function as a replacement for qmake's qt_helper_lib feature. All 3rdparty libraries will be available under the Qt:: alias when built through this method so that they can properly register as dependencies of a Qt module. This patch also adds Qt3rdPartyLibraryConfig.cmake.in to export the CMake configuration for static builds and shared libraries. Change-Id: I52bf3a95ca22fccd9ab54343468847bb1b570c28 Fixes: QTBUG-81969 Reviewed-by: Liang Qi <liang.qi@qt.io> Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
* | | | Merge remote-tracking branch 'origin/5.15' into devLiang Qi2020-02-132-1/+2
|\ \ \ \ | |_|/ / |/| | / | | |/ | |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: examples/widgets/graphicsview/boxes/scene.h src/corelib/Qt5CoreMacros.cmake src/corelib/Qt6CoreMacros.cmake src/network/ssl/qsslsocket.cpp src/network/ssl/qsslsocket.h src/platformsupport/fontdatabases/windows/qwindowsfontenginedirectwrite.cpp src/testlib/CMakeLists.txt src/testlib/.prev_CMakeLists.txt tests/auto/corelib/tools/qscopeguard/tst_qscopeguard.cpp Disabled building manual tests with CMake for now, because qmake doesn't do it, and it confuses people. Done-With: Alexandru Croitor <alexandru.croitor@qt.io> Done-With: Volker Hilsheimer <volker.hilsheimer@qt.io> Change-Id: I865ae347bd01f4e59f16d007b66d175a52f1f152
| * | Merge remote-tracking branch 'origin/5.14' into 5.15Qt Forward Merge Bot2020-02-042-1/+2
| |\ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: .qmake.conf examples/widgets/widgets/imageviewer/imageviewer.cpp src/corelib/text/qchar.cpp src/corelib/time/qdatetime.cpp Change-Id: I9762f5c4ff650799219729d6aee79ac07ce9024a
| | * | Enable system locale to skip digit-grouping if configured to do soEdward Welbourne2020-02-031-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | On macOS it's possible to configure the system locale to not do digit grouping (separating "thousands", in most western locales); it then returns an empty string when asked for the grouping character, which QLocale's system-configuration then ignored, falling back on using the base UI locale's grouping separator. This could lead to the same separator being used for decimal and grouping, which should never happen, least of all when configured to not group at all. In order to notice when this happens, query() must take care to return an empty QString (as a QVariant, which is then non-null) when it *has* a value for the locale property, and that value is empty, as opposed to a null QVariant when it doesn't find a configured value. The caller can then distinguish the two cases. Furthermore, the group and decimal separators need to be distinct, so we need to take care to avoid cases where the system overrides one with what the CLDR has given for the other and doesn't over-ride that other. Only presently implemented for macOS and MS-Win, since the (other) Unix implementation of the system locale returns single QChar values for the numeric tokens - see QTBUG-69324, QTBUG-81053. Fixes: QTBUG-80459 Change-Id: Ic3fbb0fb86e974604a60781378b09abc13bab15d Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
| | * | glgen: Fix compile errorJohan Klokkhammer Helsing2020-01-311-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Fixes compile error introduced in ff2b2032a08. Change-Id: Iee1016f7cf05638db575475c5c0d632f8edb3a8c Reviewed-by: Sona Kurazyan <sona.kurazyan@qt.io>
* | | | Merge remote-tracking branch 'origin/wip/cmake' into devAlexandru Croitor2020-02-102-11/+55
|\ \ \ \ | | |_|/ | |/| | | | | | Change-Id: If75ae006db6eb977cf66af4c3d36cb5c8098a1f1
| * | | Use posixpath when generating relative pathMårten Nordheim2020-02-071-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Fixes generating some paths with the backslash in the beginning Change-Id: Ic7705d61f9362d3b854b2eb95f95a8951beca72d Reviewed-by: Qt CMake Build Bot Reviewed-by: Cristian Adam <cristian.adam@qt.io>
| * | | Add necessities for qtquick3dMårten Nordheim2020-02-061-0/+1
| | | | | | | | | | | | | | | | | | | | Change-Id: I39aadda7ed2b088a475ba5f940d1cb65b5b62f94 Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
| * | | pro2cmake: Handle QT += core-private correctly for modulesAlexandru Croitor2020-02-051-10/+53
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | If a module project (Quick) contains QT += core-private, the qmake semantics translated to CMake would mean the following: target_link_libraries(Quick PUBLIC Core) target_link_libraries(Quick PRIVATE CorePrivate) target_link_libraries(QuickPrivate INTERFACE CorePrivate) Whereas a QT_PRIVATE += core-private only means target_link_libraries(Quick PRIVATE CorePrivate) without adding any public dependencies to QuickPrivate. To achieve that, we need a few modifications to both pro2cmake and QtBuild.cmake - pro2cmake doesn't automagically add public and private dependencies to targets when encountering a private module assigned to QT. Instead it generates the logic described above by passing correct LIBRARIES, PUBLIC_LIBRARIES, and PRIVATE_MODULE_INTERFACE values. - pro2cmake doesn't do any dependency magic for non-module targets anymore, like executables, plugins, internal_modules. This means that QT assignments are now regular public dependencies. - qt_add_module and qt_extend_target now accept a new PRIVATE_MODULE_INTERFACE option. - qt_extend_target does not automagically make private modules be public dependencies on other private modules. - qt_extend_target correctly assigns PRIVATE_MODULE_INTERFACE values to Private module only. For other target types, it's a no-op. The change requires regeneration of all projects. When we fix pro2cmake and QtBuild.cmake to properly handle internal_modules (create only Private modules without creating a non-Private counter part), we will need another project regeneration to correctly assign dependencies. Change-Id: I4c21f26b3ef3b2a4ed208b58bccb65a5b7312f81 Task-number: QTBUG-81780 Reviewed-by: Leander Beernaert <leander.beernaert@qt.io> Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
* | | | Merge remote-tracking branch 'origin/wip/cmake' into devAlexandru Croitor2020-02-0353-0/+9103
|\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This pulls the CMake port, which not only adds CMake files but also modifies existing code. A brief summary of "seemingly unrelated" changes: * configure.json was re-formatted to not use multi-line strings. That is an extension of the Qt JSON parser but not JSON compliant, which is needed for the configure.json-to-cmake conversion script (python). * Some moc inclusions were added due to CMake's slightly different way of handling moc. With the changes the files build with qmake and cmake. * Since CMake just grep's for the Q_OBJECT macro to determine whether to call moc (instead of doing pre-processing like qmake), the existing use of "Q_OBJECT" in our documentation was changed to \Q_OBJECT, which cmake doesn't see and which is now a qdoc macro. * QTestLib's qFindTestData was extended to also search in the source directory known at build time. What this change also brings is a new way of building modules in Coin by using YAML configuration files that describe the steps of building and testing in Coin specific terms. The platform configuration files in qt5 are instructed to use the old Coin built-in way of testing ("UseLegacyInstructions" feature) but for any configurations that do not have this, these yaml files in the coin/ sub-directory are used and shared across repositories. Change-Id: I1d832c3400e8d6945ad787024ba60e7440225c08
| * | | pro2cmake: Fix flake and mypy issuesAlexandru Croitor2020-01-291-5/+5
| | | | | | | | | | | | | | | | | | | | | | | | Change-Id: I33ab818c53f751ede7a7840b1086a3ae8263e109 Reviewed-by: Leander Beernaert <leander.beernaert@qt.io> Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
| * | | pro2cmake: Handle QML_IMPORT_MAJOR_VERSION and minor variantsAlexandru Croitor2020-01-291-0/+11
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This is needed for qtdeclarative examples, otherwise CMake configuration fails due to missing QML import version info. Change-Id: Iedde7b6a9e2d5ac7f6d81969ac7d6d874361c02e Reviewed-by: Leander Beernaert <leander.beernaert@qt.io> Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
| * | | Fix example generation without qmldir fileLeander Beernaert2020-01-281-4/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Do not return when no qmldir file is present and no dynamic qmldir information is set. Change-Id: I04e458f69e4e4a6ec9b1e7ca7ba0b0f7520996f7 Reviewed-by: Qt CMake Build Bot Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>