summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* CMake: Add widgets examplesTobias Hunger2019-03-26194-0/+4058
| | | | | Change-Id: Ib6142b93df066e3658eb189b50ca74c455fe7e56 Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
* .gitignore: Do not ignore stuff in examples for the time beingTobias Hunger2019-03-261-5/+6
| | | | | Change-Id: Iccf61b6613c4cd82a10051eac448711400a27ea1 Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
* CMake: Add more examplesTobias Hunger2019-03-2688-5/+1637
| | | | | Change-Id: I7a8a3fd0a844a518592957fe07c6e707dd452d5f Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
* Fix RemoveOperationJędrzej Nowacki2019-03-261-0/+3
| | | | | | | | | The operation was using an empty set as a base, so it was not really functional. Change-Id: I98fd80c1ede31994857aa1f0c8947ca7b9f76649 Reviewed-by: Tobias Hunger <tobias.hunger@qt.io> Reviewed-by: Jędrzej Nowacki <jedrzej.nowacki@qt.io>
* Speedup run_pro2cmakeJędrzej Nowacki2019-03-261-11/+23
| | | | | | | | | | We can use all cores. Sadly it doesn't balance cores well as corelib.pro takes most of the time anyway, but the speedup is visible from ~15 to 5 min. Change-Id: Id8209c58491b38d19c6e9f1163d366c3e33a182c Reviewed-by: Simon Hausmann <simon.hausmann@qt.io> Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
* Fix AUTOMOC and friends to run only once the tools are builtAlexandru Croitor2019-03-223-0/+5
| | | | | | | | | | | | | | | | | | | | | | | | While building on macOS, AUTOMOC sometimes hanged indefinitely. The problem was that AUTOMOC was executed for the qmacstyle plugin before moc was actually built. Because of an upstream bug in CMake, AUTOMOC was caught in a deadlock without reporting that spawning the moc process failed. Specifically if a libuv spawn() call failed, the condition variable for a waiting thread was not notified, and the thread kept waiting forever for the process launch to finish. Fix the dependency by setting the AUTOGEN_TARGET_DEPENDS property on all targets that have AUTOGEN tools enabled. This makes sure that moc and friends are built before they are used. Also add some special cases to disable autogen tools on certain targets to break cycles between targets. Fixes: QTBUG-74636 Change-Id: I6e689e63cba1962525f169f332a58498d173c0a6 Reviewed-by: Simon Hausmann <simon.hausmann@qt.io> Reviewed-by: Mikhail Svetkin <mikhail.svetkin@qt.io>
* Revert "Fix wrong target in qt_feature_module_begin"Alexandru Croitor2019-03-221-1/+1
| | | | | | | | | | | It broke builds because the qconfig.h file was created in the wrong directory. This reverts commit 25f67fbb073c8bedf26e165f52abacf3e20a6a94. Change-Id: Ia458ef4193a3985a9ba613d82f679b7df5ca0107 Reviewed-by: Simon Hausmann <simon.hausmann@qt.io> Reviewed-by: Liang Qi <liang.qi@qt.io>
* Temporarily disable the opengles2 feature on WIN32Alexandru Croitor2019-03-212-1/+4
| | | | | | | | | | | | | | | | | | The feature used to be implicitly enabled because qt source ships with ANGLE sources, and thus ANGLE could always be built. Yet because the CMake port of ANGLE is not done yet, and because the feature is implicitly enabled, the build failed when trying to find GLES headers. To provide a nicer out-of-the-box configuring of the Windows build, disable the opengles2 feature on Windows, to default to a desktop GL build. It can be re-enabled once (if) ANGLE porting is done. After this change, you shouldn't need to pass any additional custom FEATURE_foo options to cmake to build qtbase on Windows. Change-Id: I94c96d8ef70cf671d2ce0198311f70b55fa642b1 Reviewed-by: Liang Qi <liang.qi@qt.io> Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* Fix windows build after gui regenerationAlexandru Croitor2019-03-213-13/+23
| | | | | | | | | | | | | | | | | - vulkan/nolink is not a valid target, instead pass along vulkan include directories to consuming targets, and don't link to the library at all - fix vulkan support target name in the windows qpa dependencies - the wrong opengl dynamic feature was used in the windows qpa (the current way is consistent with qmake, otherwise there were issues with the feature evaluation, because gui feature definitions are not available in the qpa project scope) - fix issue with qfloat16_f16c not being built because of previous subarch issues Change-Id: Ia75fc76a71e516fe8718027063fe554657d4d47b Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* Add MSVC specific instruction set compiler flagsAlexandru Croitor2019-03-211-0/+15
| | | | | | | | | This is only a half solution, because some of them need to be set based on the detected MSVC version and Windows kit, similar to how it's done by qmake. Change-Id: Ice13c99d6fe0a033ddfebf9d4be924dcd6b8a36c Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* Fix sub-architecture (instruction sets / SIMD) handlingAlexandru Croitor2019-03-214-7/+17
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | In qmake there are at least 2 things to know regarding sub-architectures and instruction sets. Which instruction sets does the compiler know to compile for, represented by the various config.tests and features in qtbase/configure.json. And which instructions sets are enabled by the compiler by default, represented by the configure.json "architecture" test and accessed via QT_CPU_FEATURES.$$arch qmake argument. Before this patch there was some mishandling of the above concepts in CMake code. The former can now be checked in CMake with via TEST_subarch_foo and QT_FEATURE_foo (where foo is sse2, etc). The latter can now be checked by TEST_arch_${TEST_architecture_arch}_subarch_foo (where foo is sse2, etc and the main arch is dynamyicall evaluated). The configurejson2cmake script was adjusted to take care of the above changes, and the cmake files were regenerated as well. Change-Id: Ifbf558242e320cafae50da388eee56fa5de2a50c Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* Fix wrong target in qt_feature_module_beginAlexandru Croitor2019-03-211-1/+1
| | | | | | | Presumably this was a copy paste that was not intended. Change-Id: I09e3bb12b3b3f7af75726d7a952d79814ea9c876 Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* Fix internal features to also be evaluatedAlexandru Croitor2019-03-211-3/+10
| | | | | | | | | | | | | This amends 4f1a155909dfcba7353ebe9eee669d65336bd943 and 37b154858f41c0aa32ad124878fae96c39563d39 which caused the regeneration of some json features to be internal. Some of those features were not evaluated any more unless they were referenced in another feature. Make sure to explicitly evaluate all internal features as well. Change-Id: I4367f309585fe29dc89d8a6b793de381956ae51d Reviewed-by: Simon Hausmann <simon.hausmann@qt.io> Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
* CMake: Add public dependency from Qt::Dbus to Qt::CoreTobias Hunger2019-03-201-0/+2
| | | | | | | | Anything that uses Qt::Dbus also needs to link to Qt::Core, so encode that in the target. Change-Id: Ibc984d5b5e118aae8d1c0d21117fcff1664b0ae3 Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
* CMake: Make add_qt_executable link to Qt::Core by defaultTobias Hunger2019-03-201-2/+13
| | | | | | | | | | Make add_qt_executable link to Qt::Core by default. Add a BOOTSTRAP flag to disable this behavior again. Pass BOOTSTRAP on from add_qt_tool to add_qt_executable. Change-Id: I26e7f1e03254122f626b3765cccc0dc4414a4fc0 Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
* CMake: Handle INSTALL_DIRECTORY for qt_executablesTobias Hunger2019-03-201-1/+9
| | | | | | | Allow to override the install directory for Qt executables. Change-Id: I9561976eefe9c7b573bb97ddaaa39e30d3b6d9fb Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
* CMake: Re-generate guiTobias Hunger2019-03-201-114/+263
| | | | | Change-Id: Ia14d61ba0f2fa346090ebbb2cd179ba5b38e3056 Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
* CMake: pro2cmake.py: Report more qmake variables as usedTobias Hunger2019-03-201-6/+10
| | | | | | | | Report some more qmake variables as used when they are used to decide which kind of target to write. Change-Id: Id2602bb8cc07130456c04c53148acb73f21b0f21 Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
* CMake: pro2cmake.py: Handle "target.path" and "INSTALLS = target"Tobias Hunger2019-03-201-1/+9
| | | | | | | | Add installation location information into CMakeLists.txt files if available in CMake. Change-Id: I498deac71b1cc33c7d30790e32da236afdcb23af Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
* CMake: pro2cmake.py: Handle DBUS_*STobias Hunger2019-03-201-0/+12
| | | | | | | | Handle DBUS_ADAPTORS and DBUS_INTERFACES and turn them into equivalent CMake statements. Change-Id: Ia8a69e7ab97d9f18df93097a6e2c7c1686cb16a3 Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
* CMake: pro2cmake.py: Fix typoTobias Hunger2019-03-201-1/+1
| | | | | Change-Id: I5eebe64f825ab28a67093b1a2cef417ed0908ec0 Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
* CMake: Fix names for generated DBus adaptor/interface filesTobias Hunger2019-03-201-1/+16
| | | | | | | | | Use the same names for DBus adaptor/interface files that are also used by qmake. E.g. io.qt.something.xml will be turned into something_interface.(cpp|h) or something_adaptor.(cpp|h). Change-Id: I799b8aee7addd1fe590e8f3ec078e5325b68d5b1 Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
* CMake: Treat OUTPUT_DIRECTORY as relative to top level build directoryTobias Hunger2019-03-201-0/+3
| | | | | | | | Treat a relative path in OUTPUT_DIRECTORY as relative to the top level build directory, not to the current build directory. Change-Id: I4d409d1362a8f73d13b93cf5ab98e82e60dd62cb Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
* Add windows platform plugin and its requirementsAlexandru Croitor2019-03-186-3/+221
| | | | | | | | | | | | | - executed pro2cmake script on windows qpa plugin - added windowsuiautomation platformsupport project - fixed plugin dlls and lib files to be written to the same path - fixed an issue comErrorString which used implicit casting from QString to char*, but plugins are currently built with QT_NO_CAST_TO_ASCII Task-number: QTBUG-74140 Change-Id: I5db3b6c5264bbd5dfba2998b049fda36eb312c70 Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* Fix Windows buildAlexandru Croitor2019-03-1812-61/+111
| | | | | | | | | | | | | | | | | | | | | | | | - Fix qmake build - Fix QtNetwork moc-ing, by including the moc files inside the cpp files - Fix sql odbc plugin by including QT_PLUGIN define - Fix Boostrap to link against the Platform target, to get the correct Unicode and WIN64 defines. - Fix vulkan headers to be found - Fix freetype bzip and png unresolved symbols / linker issues when building minimal platform plugin (also need to make sure to use the vcpkg toolchain instead of CMAKE_PREFIX_PATH because then find_package is overridden, which does magic to properly propagate static library dependencies). - Fix qfilesystementry test not to be built without private tests feature (it led to undefined symbols issues). - Make sure to remove QT_NO_CAST_TO_ASCII define when building QtCore, so that the qstringbuilder3 test builds successfully. Task-number: QTBUG-74140 Change-Id: I353d08392b604d55f8e62cdd8696d1e19a3c084a Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* Regenerate cmake files from configure.json filesAlexandru Croitor2019-03-184-43/+53
| | | | | | | | | The new files represent the json features more closely. This helps with various build issues as well, like dynamicgl feature not being present before. Change-Id: I433592f48e0550700226a635492a3ce15af743c1 Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* Improve configurejson2cmake feature output generationAlexandru Croitor2019-03-181-30/+72
| | | | | | | | | | | | | | | | | | | There were a few cases of feature outputs that were handled incorrectly before this change, specifically: - publicFeatures and privateFeatures with custom names - privateFeatures that also ended up writing defines into public headers - publicFeatures that ended up in private headers - internal features (that should have no QT_FEATURE_foo defines) that were still written to either public or private headers The change takes care of all those cases by keeping a map of which features need to be written along with any visibility specifications, as well as custom name changes. Change-Id: I37baeaeacdfe4935128a392c72ca71b5c3ca1c8d Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* Do define generation after feature evaluationAlexandru Croitor2019-03-181-18/+40
| | | | | | | | | | | | | | | | | | | Instead of generating defines guarded by feature ifdefs, record the define information (condition, name, value, etc), and generate the final define statement only if the feature condition evaluated to true. This removes the need to generate feature defines (QT_FEATURE_foo) for features that have neither public nor private outputs in the configure.json file. Also note that all qt_feature_definition() calls (which correspond to type:"define" outputs in json files) now generate defines only in the public header, which seems to be consistent with how qmake evaluates json files. Change-Id: I5210b405d5735dd9df5f7a55d1ea9547bb7b1159 Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* CMake: Add QT_CFLAGS_* when building x86simd testsTobias Hunger2019-03-183-7/+22
| | | | | Change-Id: I5caa088d517cb9d3749c3ed8ef88a41552c1d340 Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
* CMake: pro2cmake.py: Better reporting of unused keys from qmakeTobias Hunger2019-03-181-28/+25
| | | | | Change-Id: Ie1b1f446c314bb5248cc13efeae1f279b0182e04 Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
* CMake: pro2cmake.py: Handle SIMD sourcesTobias Hunger2019-03-182-0/+78
| | | | | Change-Id: Ib445888e769432e8c247ae2d2fb5d8af2d5cd275 Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
* Corelib: Update to include qrc-file removalTobias Hunger2019-03-181-1/+6
| | | | | Change-Id: I18d556d7517de7d9f2eb55045511d2166f0105ce Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* Use qt_evaluate_config_expression for feature enable conditionsAlexandru Croitor2019-03-141-2/+4
| | | | | | | | | | | | | | | Certain features like opengles2 can be enabled or disabled based on the conditions that are specified in the ENABLE and DISABLE parameters. Because some of those conditions use STREQUAL with a single quoted argument, we have to use qt_evaluate_config_expression to circumvent the CMake bug regarding single quotes, which is described in the function implementation. Only then will enabling / disabling work correctly. Change-Id: I3b68ef611c985f0d8416fd089055fd862da1e542 Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
* CMake: configurejson2cmake.py: Fix typoTobias Hunger2019-03-121-1/+1
| | | | | Change-Id: Ib142032577f1d84bfb2402103271db04a4bb25a1 Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* Update README to mention setting the vcpkg toolchainAlexandru Croitor2019-03-111-1/+2
| | | | | Change-Id: Icac2ba956246901e02bb6aa257f81cccf56560e8 Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
* CMake: pro2cmake.py: Remove .qrc files!Tobias Hunger2019-03-111-16/+91
| | | | | | | Remove qrc files from CMake. Use add_qt_resource function instead. Change-Id: I64cdbd9498f97d23cd8e03f34ab5ae4a52dba5af Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
* Fix header Depends file generationAlexandru Croitor2019-03-111-0/+1
| | | | | | | | The script used to write incorrect dependency headers due to not clearing the qtdeps variable at each loop step. Change-Id: Icf293be7cea596daa096ab19d390c0bb468a8654 Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
* Improve add_qt_resource functionTobias Hunger2019-03-111-8/+24
| | | | | | | | * Handle BASE to give the directory files will be relative to. * Support lang="foo" for qresource sections. Change-Id: I36087220d03789a97105dc6dd1aca7a25a063d9f Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* CMake: Re-generate CMakeLists.txt file for networkTobias Hunger2019-03-112-133/+101
| | | | | Change-Id: Ib75578958a98947efbca853692b24528c1a3e8a5 Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
* CMake: Re-generate CMakeLists.txt file for corelibTobias Hunger2019-03-111-351/+540
| | | | | Change-Id: I96fb3e388a39481c513f1c6a23327e41a785e4af Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
* cmake: fix the order of parameters for homebrewLiang Qi2019-03-071-1/+1
| | | | | Change-Id: I7b597a8d6bc81eafb21e5368a29700638c351bdf Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
* Update README to specify the minimum version of CMake neededAlexandru Croitor2019-03-071-3/+6
| | | | | Change-Id: I10e594859129bddfa56f078389b2272a0072fda0 Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* cmake: build qmacstyleLiang Qi2019-03-063-1/+31
| | | | | | Change-Id: I1fa0196036ffd31b5961bb5b73ff21123a818af8 Reviewed-by: Albert Astals Cid <albert.astals.cid@kdab.com> Reviewed-by: Mikhail Svetkin <mikhail.svetkin@qt.io>
* cmake: fix cocoa and graphics on macOSLiang Qi2019-03-063-6/+7
| | | | | | Change-Id: Ia956c74a54874f91cc0ea8e5105164de88890ff2 Reviewed-by: Mikhail Svetkin <mikhail.svetkin@qt.io> Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
* cmake: Fix moc on macOSMikhail Svetkin2019-03-062-11/+52
| | | | | | | | | moc does not generate moc_defs.h and that's why moc does not understand that he runs on macOS. It happens because cmake can not find Qt version. Change-Id: I34c51ebb69dc1ff782a0f129e114cda819122805 Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
* Fix buildSimon Hausmann2019-03-061-1/+1
| | | | | | | | | There is no more internal function for adding general linker flags. Let's use the appropriate cmake function right away, regardless of the compiler choice. This is also how global.pri handled it. Change-Id: I20c9002a31aa4d7e64c1c59d8d67118774da337c Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
* CMake: Re-generate bootstrap-related CMakeLists.txt filesTobias Hunger2019-03-045-154/+243
| | | | | Change-Id: Ia4be80729807c6aaac5b22a0dab81a841d57bdcd Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
* CMake: Handle gc-sections linker flagsTobias Hunger2019-03-041-11/+21
| | | | | | | Add a function to set gc-sections flags on the linker. Change-Id: I9ac02364836d2aa8de239adb8d3a5d29659a4007 Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
* CMake: Re-generate CMakeLists.txt file for concurrent and sqlTobias Hunger2019-03-042-2/+35
| | | | | Change-Id: I3b61e35a65d369f0fff7c61c0b3af6f6e2974e1f Reviewed-by: Albert Astals Cid <albert.astals.cid@kdab.com>
* CMake: Re-generate CMakeLists.txt files for src/tools/*Tobias Hunger2019-03-044-5/+61
| | | | | | | | Re-generate the CMakeLists.txt files for qdbusxml2cpp, qdbuscpp2xml, qlalr and qvkgen. Change-Id: I473a7bbdfa5ed5049d17324fb7dab4940124ef86 Reviewed-by: Albert Astals Cid <albert.astals.cid@kdab.com>