- 08 Mar, 2022 10 commits
-
-
Jörg Bornemann authored
Add qmake2cmake[.bat] wrapper scripts that can be used to convert user projects to CMake. For now, user projects are internally handled as Qt examples with one difference: the generation of example-specific installation code is suppressed. Fixes: QTBUG-98655 Change-Id: I1a57f6d12efe0bdf383592ab33682a611692db80 Reviewed-by:
Alexandru Croitor <alexandru.croitor@qt.io>
-
Jörg Bornemann authored
Task-number: QTBUG-98852 Change-Id: I4c86fff7bbcc6c42cd04094f2409c3d04779597c Reviewed-by:
Alexandru Croitor <alexandru.croitor@qt.io>
-
Jörg Bornemann authored
This function does not handle installation. Change-Id: I02fdc244f49b5935aa1ac51bff8a25970ad3a335 Reviewed-by:
Alexandru Croitor <alexandru.croitor@qt.io>
-
Jörg Bornemann authored
This makes the QT_VERSION_(MAJOR|MINOR|PATH) variables available. Task-number: QTBUG-98852 Change-Id: I7e40f2a7ac09975ce21e45cda384af928e1fa629 Reviewed-by:
Alexandru Croitor <alexandru.croitor@qt.io>
-
Jörg Bornemann authored
...and write a separate find_package(Qt6 OPTIONAL_COMPONENTS Foo Bar) call for those. Task-number: QTBUG-96799 Change-Id: I3386487774c386edde6767dca92ce433bfed906e Reviewed-by:
Alexandru Croitor <alexandru.croitor@qt.io>
-
Jörg Bornemann authored
If you can set the environment variable DEBUG_PRO2CMAKE_TEST_CONVERSION to 1, the output of pro2cmake is written to the temp directory. This helps analysing test failures. Change-Id: Ida42c5b76a67172d00ce0d2488adc7fb376c6b11 Reviewed-by:
Alexandru Croitor <alexandru.croitor@qt.io>
-
Jörg Bornemann authored
Change-Id: I1bf232fa3c389eb86707d3af04de6cf9eb09451a Reviewed-by:
Alexandru Croitor <alexandru.croitor@qt.io>
-
Jörg Bornemann authored
Task-number: QTBUG-96799 Change-Id: I1eb8ac05f360b74e5ae1217b5535a33227b5084b Reviewed-by:
Alexandru Croitor <alexandru.croitor@qt.io>
-
Jörg Bornemann authored
LibraryMapping.components is a list that holds the sub-components of a CMake package. Before, we held this information in LibraryMapping.extra as find_package argument. A subsequent patch will make use of LibraryMapping.components and doesn't have to do find_package argument parsing. Change-Id: Ie0d317245fb6ec1511e06b2e14c364292fced63a Reviewed-by:
Alexandru Croitor <alexandru.croitor@qt.io>
-
Jörg Bornemann authored
We prefer it when the CMakeLists.txt project files for examples use qt_add_qml_module() when adding resource files, rather than qt6_add_resource(). A bit of refactoring was needed to re-use the code that extracts resource information from the .pro file. The new function write_qml_module is now responsible for writing qt_add_qml_module calls. Task-number: QTBUG-96799 Change-Id: I74dc2d681dcf4fc848e1147b3232ce9a9e0946c9 Reviewed-by:
Alexandru Croitor <alexandru.croitor@qt.io>
-
- 03 Mar, 2022 2 commits
-
-
Jörg Bornemann authored
Change-Id: If1f5d8b5afc76fac62fdf9836a17c4ab87ddc1b1 Reviewed-by:
Alexandru Croitor <alexandru.croitor@qt.io>
-
Jörg Bornemann authored
Mypy reported the following: condition_simplifier_cache.py:111: error: Argument 1 has incompatible type "*List[str]"; expected "Optional[float]" file_handle = file_open_func(*file_open_args, **file_open_kwargs) ^ condition_simplifier_cache.py:111: error: Argument 2 has incompatible type "**Dict[str, object]"; expected "Union[str, Path]" file_handle = file_open_func(*file_open_args, **file_open_kwargs) Fix by calling portalocker.Lock directly. Change-Id: I538319791b1a4a1b6dffac0544d87c705e8809a7 Reviewed-by:
Alexandru Croitor <alexandru.croitor@qt.io>
-
- 28 Feb, 2022 8 commits
-
-
Alexandru Croitor authored
And the target ZSTD::ZSTD to WrapZSTD::WrapZSTD. This should allow building Qt with the -DCMAKE_FIND_PACKAGE_PREFER_CONFIG=ON set. Pick-to: 6.2 6.3 Fixes: QTBUG-100537 Change-Id: I748601e4ad6f518323bf1034d6fc1de582c815e1 Reviewed-by:
Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by:
Jörg Bornemann <joerg.bornemann@qt.io>
-
Jörg Bornemann authored
Mention that flake8 and black can be run via Makefile targets. Remove the outdated list of flake8 warnings. The Makefile ignores more warnings/errors, and it doesn't seem to be useful to duplicate this list here. Also remove the description of the black tool's arguments for the same reason. Change-Id: I941c3ab68b7a3d2477f7fbb5d28603987d0b2cab Reviewed-by:
Alexandru Croitor <alexandru.croitor@qt.io>
-
Jörg Bornemann authored
For example projects, change the generated project() call to project(foo VERSION 1.0 LANGUAGES CXX) Some CMake API derives default values from the project version, and it's generally advisable to set a project version number. The version number is read from qmake's VERSION variable. That's actually a target version number, but it might be the right thing in most cases. Fall back to version 1.0 if VERSION is not set. Task-number: QTBUG-96799 Change-Id: Ia0c551cf62621eb217e1dd541dcbd8945f78138e Reviewed-by:
Alexandru Croitor <alexandru.croitor@qt.io>
-
Unfortunately qmake does not have operator precedence in conditions, and each sub-expression is simply evaluated left to right. So c1|c2:c3 is evaluated as (c1|c2):c3 and not c1|(c2:c3). To handle that in pro2cmake, wrap each condition sub-expression in parentheses. It's ugly, but there doesn't seem to be another way of handling it, because SymPy uses Python operator precedence for condition operators, and it's not possible to change the precendece. Fixes: QTBUG-78929 Change-Id: I6ab767c4243e3f2d0fea1c36cd004409faba3a53 Reviewed-by:
Alexandru Croitor <alexandru.croitor@qt.io>
-
Jörg Bornemann authored
Change the expected value from None to [], because that's the value of the if branch. It has been like that since v6.0.0 at least. Change-Id: Iefdb22a772fc5540ad5a38566be5a7f529e00cb1 Reviewed-by:
Alexandru Croitor <alexandru.croitor@qt.io>
-
Jörg Bornemann authored
If the flavors argument is an empty list, this function becomes the identity function. Change-Id: I534df079578ff27d24ae15760ea12464e3961f93 Reviewed-by:
Alexandru Croitor <alexandru.croitor@qt.io>
-
Jörg Bornemann authored
When the android-embedded scope was removed in a3f8b357 , the conditions in test_scope_handling.py were adjusted following the laws of logic. However, the scope handling code does not follow the same laws. Effectively revert the part of said commit in test_scope_handling.py but use "UNKNOWN_PLATFORM" instead of "ANDROID_EMBEDDED". Change-Id: Ic090451e2a28b50f5be5668503e216cbe3871633 Reviewed-by:
Alexandru Croitor <alexandru.croitor@qt.io>
-
Jörg Bornemann authored
...to have a consistent baseline for further improvements. Change-Id: Iba8e83a7a5cf5ca0cdf509f79e7d2dc2d8f42fec Reviewed-by:
Alexandru Croitor <alexandru.croitor@qt.io>
-
- 31 Jan, 2022 1 commit
-
-
Jani Heikkinen authored
Change-Id: Ie0e2133d6c9125b901364c979c60b6efd585f026 Reviewed-by:
Qt Submodule Update Bot <qt_submodule_update_bot@qt-project.org>
-
- 21 Jan, 2022 2 commits
-
-
Jörg Bornemann authored
To tool generates calls to qt6_add_resources instead, and we don't want to promote the usage of CMAKE_AUTORCC. Task-number: QTBUG-87643 Change-Id: I58458416514949a6ffc9b93c7eb6d24bc2ed01ca Reviewed-by:
Alexandru Croitor <alexandru.croitor@qt.io>
-
Jörg Bornemann authored
The pyparsing module's debug action properties have been renamed. Check the existence of the attributes before assigning. Change-Id: I8fff652304a0af215c56f54b63d613a1f6a5207a Reviewed-by:
Alexandru Croitor <alexandru.croitor@qt.io>
-
- 01 Nov, 2021 1 commit
-
-
Jörg Bornemann authored
The function qt_commandline_assignment and everything related to it is removed from configure. It was only used in qtbase, and all usage has been removed. More general variable assignments will be added in a subsequent commit. Task-number: QTBUG-88210 Change-Id: I7cfa782e89914f2b0dc0277c46e425c8a825557e Reviewed-by:
Alexandru Croitor <alexandru.croitor@qt.io>
-
- 08 Oct, 2021 1 commit
-
-
Jörg Bornemann authored
Since commit f3c7d22dd04afe8d889585fb5d6426f3d4591e74 we do not use libraries from /usr/local and other non-system locations on macOS. But our configure tests still did. This led to discrepancies between find_package calls in configure tests and the Qt project itself. Mentioned commit removed /usr/local and friends from CMAKE_SYSTEM_PREFIX_PATH. But we can't pass this variable to the configure tests, because CMake sets it up and overwrites our value. Pass CMAKE_SYSTEM_PREFIX_PATH and CMAKE_SYSTEM_FRAMEWORK_PATH as QT_CONFIGURE_TEST_CMAKE_SYSTEM_{PREFIX|FRAMEWORK}_PATH variables to tests. Tests with separate project files that call find_package() must add code like this after the project() command: if(DEFINED QT_CONFIGURE_TEST_CMAKE_SYSTEM_PREFIX_PATH) set(CMAKE_SYSTEM_PREFIX_PATH "${QT_CONFIGURE_TEST_CMAKE_SYSTEM_PREFIX_PATH}") endif() if(DEFINED QT_CONFIGURE_TEST_CMAKE_SYSTEM_FRAMEWORK_PATH) set(CMAKE_SYSTEM_FRAMEWORK_PATH "${QT_CONFIGURE_TEST_CMAKE_SYSTEM_FRAMEWORK_PATH}") endif() Adjust pro2cmake accordingly. Task-number: QTBUG-97076 Change-Id: Iac1622768d1200e6ea63be569eef12b7eada6c76 Reviewed-by:
Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by:
Alexandru Croitor <alexandru.croitor@qt.io>
-
- 27 Sep, 2021 3 commits
-
-
Alexandru Croitor authored
Previously pro2cmake assumed that all .pro were internal Qt projects like qtbase/src/corelib.pro and generated private api calls like qt_internal_add_module(). Public CMake API calls (like qt_add_executable) were only generated if an --is-example command line flag was passed to the script or if the .pro file was located under the examples subfolder of a qt repo source directory (indicated by the presence of a .qmake.conf file). Change the logic to always generate public CMake API code by default, unless a .cmake.conf/.qmake.conf file is encountered with a valid repo module version inside, in which case apply the old heuristic of checking for the ./examples subfolder. The intention is to have a sensible default so that Qt users can use the script to more easily migrate their qmake projects without having to explicitly specify the --is-example flag. Pick-to: 6.2 Task-number: QTBUG-96799 Change-Id: I38f4f1b349a5b9688cf7bc5914d4fde72e660a98 Reviewed-by:
Joerg Bornemann <joerg.bornemann@qt.io>
-
Alexandru Croitor authored
Adapt to fb656c036db0549180073e133773862d08f6cd24 which removes .qmake.conf files in repos by searching for either .qmake.conf or .cmake.conf. The locations of those files are only used to compute relative paths based on the directory where the conf file is. For now, remove the warning if a conf file is not found, because we intend to change the script to generate user project code by default, instead of Qt internal project code and the warning looks scary. Pick-to: 6.2 Task-number: QTBUG-96799 Change-Id: I301e93d2ce5c05a52877eb6ed9eb9cee54fc5b15 Reviewed-by:
Joerg Bornemann <joerg.bornemann@qt.io>
-
Jörg Bornemann authored
Introduce a new macro qt_internal_return_unless_building_tools which simply calls return() if tools are not built. This macro is supposed to be called after qt_internal_add_tool(). Using this macro avoids having to special-case code for when qt_internal_add_tool() creates imported targets in cross-builds. Adjust pro2cmake accordingly. Task-number: QTBUG-85084 Change-Id: I9e1c455c29535dd8c318efa890ebd739c42effc1 Reviewed-by:
Alexandru Croitor <alexandru.croitor@qt.io>
-
- 22 Sep, 2021 1 commit
-
-
Alexandru Croitor authored
Needed for subsequent change that will check and error out if the version is lower than 3.16. We do that to ensure all policies introduced by CMake up to version 3.16 have their behavior set to NEW. Pick-to: 6.2 Task-number: QTBUG-95018 Change-Id: Ieaf82c10987dd797d86a3fd4a986a67e72de486a Reviewed-by:
Kai Koehne <kai.koehne@qt.io>
-
- 17 Sep, 2021 1 commit
-
-
Edward Welbourne authored
It is no longer handled separately from Android. This effectively reverts commit 6d50f746fe05a7008b63818e77784dd0c99270a1 Change-Id: Ic2d75b8c5a09895810913311ab2fe3355d4d2983 Reviewed-by:
Assam Boudjelthia <assam.boudjelthia@qt.io>
-
- 09 Sep, 2021 2 commits
-
-
Alexandru Croitor authored
pro2cmake.py:458:5: F841 local variable 'is_parent_path' is assigned to but never used Pick-to: 6.2 Change-Id: I1c61efe5cf568fa0c99b07eed28b93d3444a5fac Reviewed-by:
Alexey Edelev <alexey.edelev@qt.io>
-
Alexandru Croitor authored
Pick-to: 6.2 Change-Id: I718e34d628576bb709096c0672da3a69b71ae8df Reviewed-by:
Alexey Edelev <alexey.edelev@qt.io>
-
- 08 Sep, 2021 1 commit
-
-
Oliver Eftevaag authored
This patch will slightly change the output of CMakeLists.txt files that are generated for examples. * set_target_properties() will no longer be added to the top-level scope. If the WIN32 and MACOSX_BUNDLE properties should be added, they will instead be added to qt_add_executable(). * The version in cmake_minimum_required() will now be 3.16, rather than 3.14. Pick-to: 6.2 Change-Id: I79e1865dace5538d2b7ff264da02f9e28a655ae9 Reviewed-by:
Alexandru Croitor <alexandru.croitor@qt.io>
-
- 02 Aug, 2021 1 commit
-
-
Alexandru Croitor authored
Fixes: QTBUG-95454 Change-Id: I2467d3ae27b54424e59a7a4ab00d364eaec517d5 Reviewed-by:
Jani Heikkinen <jani.heikkinen@qt.io>
-
- 01 Jul, 2021 1 commit
-
-
Alexandru Croitor authored
Introduce two new packages WrapVulkanHeaders and WrapVulkan similar to the OpenSSL wrapper packages. WrapVulkanHeaders uses FindVulkan and is marked as found if Vulkan headers are found (that's the only part the Qt build requires). The WrapVulkan package is currently not used, but is there for symmetry. The Vulkan feature is now disabled by default on QNX, because the QNX toolchain file in the CI does not set CMAKE_FIND_ROOT_PATH_MODE-like variables and CMake ends up finding host Vulkan headers causing the build to break. Pick-to: 6.2 Fixes: QTBUG-92157 Change-Id: I05309821f866456cd42e7f85bf8b76ba099df656 Reviewed-by:
Alexey Edelev <alexey.edelev@qt.io> Reviewed-by:
Assam Boudjelthia <assam.boudjelthia@qt.io> Reviewed-by:
Alexandru Croitor <alexandru.croitor@qt.io>
-
- 22 Jun, 2021 1 commit
-
-
Alexey Edelev authored
Pick-to: 6.2 Task-number: QTBUG-94613 Change-Id: I7d5954c176c0f036a27b4ab1312505b77b2c67d5 Reviewed-by:
Alexandru Croitor <alexandru.croitor@qt.io>
-
- 11 Jun, 2021 1 commit
-
-
Alexey Edelev authored
Add 'Private' suffix to the internal module names in the mappings of the qmake files for modules of the qtdeclarative repo. Change-Id: I1592ebad0f0db553322ea766561b1b8c3fd38aea Reviewed-by:
Alexandru Croitor <alexandru.croitor@qt.io>
-
- 10 Jun, 2021 2 commits
-
-
Alexey Edelev authored
Add 'Private' suffix to the internal module names in the mappings of the qmake files. Change-Id: Iacc487aa5e463a522341e526bf8580be2868cf37 Reviewed-by:
Alexandru Croitor <alexandru.croitor@qt.io>
-
Jani Heikkinen authored
Change-Id: I4a862360d627f1ea18a27920bb440da28ddc5b22
-
- 03 Jun, 2021 1 commit
-
-
Add FindWrapSystemMd4c.cmake so that the old md4c target can be used as well as the new one and set WrapSystemMd4c_FOUND. Link to the imported target WrapSystemMd4c::WrapSystemMd4c if the system library is used. Add qt_find_package line to find the package in configure.cmake. Fix the condition for enabling system-textmarkdownreader, it includes testing for textmarkdownreader because even if the code would compile correctly without it, it looks strange when the output says "textmarkdownreader no" and under "using system libmd4c yes" even if libmd4c is not used. Use system include when system-markdownreader is enabled. Add library mapping for libmd4c. Change-Id: Id5d5b13d6691a8c1cdf627238887977c847c1e67 Reviewed-by:
Shawn Rutledge <shawn.rutledge@qt.io> Reviewed-by:
Alexandru Croitor <alexandru.croitor@qt.io>
-