| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
|
|
|
|
|
|
| |
Xcode expects the base SDK to always be the device SDK, so we can't
pass CMAKE_OSX_SYSROOT on directly.
We use the Xcode SUPPORTED_PLATFORMS setting to inform Xcode about
which targets we can actually build and run for.
The logic is only triggered for single-arch Qt builds.
Change-Id: I0012e220cb415fcc5995672ffd60b25ef7eeb4e7
Reviewed-by: Alexey Edelev <alexey.edelev@qt.io>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Qt already runs on Vision Pro as "Designed for iPad", using Qt
for iOS. This change enables building Qt for visionOS directly,
which opens the door to visionOS specific APIs and use-cases
such as volumes and immersive spaces.
The platform removes some APIs we depend on, notably UIScreen,
so some code paths have been disabled or mocked to get something
up and running.
As our current window management approach on UIKit platforms
depends on UIWindow and UIScreen there is currently no way to
bring up QWindows. This will improve once we refactor our
window management to use window scenes.
To configure for visionOS, pass -platform macx-visionos-clang,
and optionally add -sdk xrsimulator to build for the simulator.
Change-Id: I4eda55fc3fd06e12d30a188928487cf68940ee07
Reviewed-by: Alexey Edelev <alexey.edelev@qt.io>
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This function finds the translations that belong to the Qt modules that
are used by the project. "Used by the project" means just all modules
that are pulled in via find_package for now.
This code was in Qt6CoreDeploySupport.cmake before. Now, we can call it
in other places too like Qt6LinguistToolsMacros.cmake.
Task-number: QTBUG-110444
Change-Id: I338d54d93cf285190b1430608b32334692ae4c07
Reviewed-by: Alexey Edelev <alexey.edelev@qt.io>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Make qt_finalize_target call qt6_extract_metatypes() on any library
targets if the finalization is deferred and the target uses automoc.
This makes sure the metatype information is always available when
necessary (e.g. in QML's foreign types setting).
[ChangeLog][CMake][Important Behavior Changes] With CMake 3.19 or later
qt_extract_metatypes() is automatically called during target
finalization for libraries that use automoc now. This has no
effect if you've already manually called qt_extract_metatypes() before,
but it does make sure that the metatypes are also generated if you
haven't.
Task-number: QTBUG-121199
Fixes: QTBUG-101143
Fixes: QTBUG-99051
Change-Id: If72ce5887a9cd71a4c15e9509b2eaab5af271adf
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
Reviewed-by: Alexey Edelev <alexey.edelev@qt.io>
|
|
|
|
|
|
|
|
|
| |
This reverts commit 5898e0e4f14d1e6d0b0fc09e122346d817cb821a.
Likely broke a CMake deployment test in qtdeclarative.
Change-Id: I90c8343f0657845dd514e573b7333f441b70cc9e
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This reverts commit 654f3c5634ac9efc2257177351c8dea7c8d8875a.
That commit enabled a work-around for CMake upstream issue #19005 for
Visual Studio project generators. It turns out that this is not actually
needed, and that the work-around causes unnecessary rebuilds.
Fixes: QTBUG-121046
Pick-to: 6.5 6.6 6.7
Change-Id: Ie502e2df999a204ab09d28322017be3c7ed8ebc5
Reviewed-by: Alexey Edelev <alexey.edelev@qt.io>
|
|
|
|
|
|
|
|
|
|
|
| |
Xcode expects the base SDK to always be the device SDK, so we can't
pass CMAKE_OSX_SYSROOT on directly.
We use the Xcode SUPPORTED_PLATFORMS setting to inform Xcode about
which targets we can actually build and run for.
Change-Id: Ib46e81e946bc89f62d1e700422b37166c3d55009
Reviewed-by: Alexey Edelev <alexey.edelev@qt.io>
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
So we have a single central location for all generated files.
[ChangeLog][Build System] Generated resource files (and supporting
files) will now be placed into the .qt/rcc subdirectory of a project
build dir. The location is an implementation detail that might still
change in the future, so it should not be relied upon.
Pick-to: 6.7
Change-Id: Id21df22cac832b618e98c25e0e134f4cf70ed9bd
Reviewed-by: Alexey Edelev <alexey.edelev@qt.io>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Currently if qt6_generate_deploy_app_script is called on an executable
target that does not have the MACOSX_BUNDLE property set, it will
error out with a message about not supporting non-bundle apps.
This error is shown even if NO_UNSUPPORTED_PLATFORM_ERROR is passed
as an option which looks like an oversight.
Change the code not to show the error if NO_UNSUPPORTED_PLATFORM_ERROR
is passed. This means user projects can call
qt6_generate_deploy_app_script for non-bundle apps without having to
wrap the code in a if(NOT APPLE) check, and deployment will simply not
run for that target on macOS.
[ChangeLog][Build System] The qt6_generate_deploy_app_script
NO_UNSUPPORTED_PLATFORM_ERROR option will now have an effect when
calling the API on non-bundle macOS executable targets.
Pick-to: 6.7
Change-Id: I932d6bfa2d3c7e2aaf8be967fea1f682eacf0112
Reviewed-by: Alexey Edelev <alexey.edelev@qt.io>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
We would like to add deployment api calls to all our examples.
Doing that in the CI, where we build all examples, would mean running
the deployment tools for each example. This takes time and space.
Add the option to skip running deployment code by setting the
QT_INTERNAL_SKIP_DEPLOYMENT variable.
This can be set per-directory or at the root directory.
In that case we will generate an install script that does nothing.
With this option, we can ensure we run deployment for a few examples,
but skip it for the rest.
Also skip running the deployment api for non-prefix builds, because it
only partially works. In such a case, show a warning. The warning
can be hidden by setting the QT_INTERNAL_HIDE_NO_OP_DEPLOYMENT_WARNING
variable. This might be revisited in the future.
The newly introduced helper functions are also meant to be used in
qtdeclarative.
qtbase only uses one of them, because currently it does not contain
POST_BUILD deployment logic.
Pick-to: 6.7
Task-number: QTBUG-90820
Task-number: QTBUG-96232
Task-number: QTBUG-102057
Change-Id: If5a4102137e9dfc4a8bfde7b26d511ed1700340e
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Since d08fa86e63448377dde4297bc94680a9d7daaaeb we add extra deploy
files with target file information.
The file paths contain a $<CONFIG> genex to handle multi-config
builds. These were not evaluated in the DeploySupport file content.
Add a TARGET_GENEX_EVAL genex around the TARGET_PROPERTY genex, to
ensure they do get evaluated.
This avoids an error like:
include could not find requested file:
C:/Users/qt/work/qt/qtbase_build/.qt/QtDeployTargets-$.cmake
Amends d08fa86e63448377dde4297bc94680a9d7daaaeb
Pick-to: 6.7
Task-number: QTBUG-117948
Task-number: QTBUG-118153
Change-Id: Ia3898c31d80b82bdb25fe733fc73b45c6d689ed0
Reviewed-by: Alexey Edelev <alexey.edelev@qt.io>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
A qt installation might not contain the non-versioned the qtpaths.exe
installed, but keep the versioned qtpaths6.exe.
Try to use the versioned version before the non-versioned one.
If none exists, show a warning at deployment time.
Amends 571201603acc731330c9af42a3aca9cda41d38fd
Pick-to: 6.5 6.6 6.7
Fixes: QTBUG-122664
Task-number: QTBUG-119619
Change-Id: I23caf9ed3c7928fbab9657b0c0c64517dfc7d68e
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
To ensure examples can be built as ExternalProjects, the example
subdirectories need to be added via qt_internal_add_example rather
than just add_subdirectory.
qt_internal_add_example is also needed for correct installation of
example sources.
To catch examples that are still not added via
qt_internal_add_example, set a QT_WARN_ABOUT_EXAMPLE_ADD_SUBDIRECTORY
variable at the top of the examples/CMakeLists.txt directory scope
and show a warning in qt_add_executable whenever that variable is
TRUE.
Calls of qt_internal_add_example will set the variable to FALSE,
making sure the warning is not shown for properly added examples.
This is limited to developer builds and can be opted out of via the
QT_NO_WARN_ABOUT_EXAMPLE_ADD_SUBDIRECTORY_WARNING variable.
qt_add_executable is used as the 'hook' for showing the error, because
that is the most likely function to be used in examples.
We don't use qt_standard_project_setup in all projects yet, so we
don't want to use that one.
Task-number: QTBUG-90820
Task-number: QTBUG-123096
Change-Id: I7a0b0b2cc60c70903db03b56c06494c127a62420
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Resurrect the parameters I18N_LANGUAGES and I18N_NATIVE_LANGUAGE for now
to allow integration of renaming changes that are a result of the Qt 6.7
CMake API review. Also, unblock dependency updates in qttools.
These parameters will be removed once all dependencies have been updated
throughout the repos.
Fixes: QTBUG-122691
Change-Id: Id0bfba50c7b168c61457ddf02b89e3d2c785e02b
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
|
|
|
|
|
|
|
| |
Pick-to: 6.7
Task-number: QTBUG-122396
Change-Id: I36c76211529e685aa1c85a7fb1b15667ad479185
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
|
|
|
|
|
|
|
|
|
| |
...according to the Qt 6.7 CMake API review.
Pick-to: 6.7
Task-number: QTBUG-122396
Change-Id: I42012e346325ff05d63fa4dac44276eef15320fe
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Make sure not to set the AUTORCC_OPTIONS property on INTERFACE_LIBRARY
targets, because it's not allowed with CMake versions lower than 3.18.
Amends 329dbfcc78d067d26b5a4dd99f4284900fd68f2c
Pick-to: 6.5 6.6 6.7
Fixes: QTBUG-122266
Task-number: QTBUG-106466
Task-number: QTBUG-101353
Task-number: QTBUG-121948
Change-Id: I9ab606c0b11e2b4f8689e0bde9c001f59c81fa42
Reviewed-by: Alexey Edelev <alexey.edelev@qt.io>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
When cross-compiling, host rcc might generate zstd compressed
resources, even though the target might not support zstd
decompression.
To avoid that, we made sure to disable zstd compression when using
cmake api like qt_add_resources if the target platform does not
support it.
We did not do it for CMAKE_AUTORCC though.
In such a situation, the linker would fail with:
error: undefined symbol: qt_resourceFeatureZstd
Add the --no-zstd option to AUTORCC_OPTIONS for targets that are
created by Qt CMake public API like qt_add_executable and
qt_add_library if the target platform does not support zstd
decompression (check via the QT_FEATURE_zstd variable).
This in turn applies to our own qt_internal_add_ API as well.
Allow opting out via the QT_NO_AUTORCC_ZSTD CMake variable.
[ChangeLog][Build System] Targets created with qt_add_executable
and qt_add_library will now add the --no-zstd option to AUTORCC_OPTIONS
when the target platform does not support zstd decompression. You can
opt out via the QT_NO_AUTORCC_ZSTD cmake variable.
Pick-to: 6.5 6.6 6.7
Fixes: QTBUG-121948
Task-number: QTBUG-106466
Task-number: QTBUG-101353
Change-Id: Ibdcfecd9a4b1e206479a3f4588b1b624dd91e122
Reviewed-by: Alexey Edelev <alexey.edelev@qt.io>
|
|
|
|
|
|
|
|
|
|
| |
Use the work-around for CMake issue #19005 for Makefile generators
and Visual Studio projects.
Pick-to: 6.7 6.6 6.5
Fixes: QTBUG-120317
Change-Id: I3d15f23937133a5dd4d1c2a88af0fc34d5608a77
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Since 6.7 we consider the BUILD_SHARED_LIBS when creating libraries
using Qt CMake API. This change may affect the user projects that rely
on the old strategy of selecting the default library type. To preserve
the old behavior this change introduces the QTP0003 policy that allows
user to control whether the BUILD_SHARED_LIBS should or shouldn't be
considered in library creation process.
The policy doesn't affect Qt repos, we assume that we want the NEW
behavior by default.
Fixes: QTBUG-121707
Pick-to: 6.7
Change-Id: I4bcfbd8966839731624e3f7ef9e0d6bb2782ac50
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
Reviewed-by: Leena Miettinen <riitta-leena.miettinen@qt.io>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This reverts commit ab6950acab5f799e5b3f097a87300e7c1dd1cf04.
Reason for revert: It breaks test_qml_app_deployment test in qtdeclarative for iOS and Xcode
Pick-to: 6.6 6.5
Fixes: QTBUG-121729
Task-number: QTBUG-120317
Change-Id: I356882a97f63534aa17133a4fbbb1db90295dfba
Reviewed-by: Jani Heikkinen <jani.heikkinen@qt.io>
(cherry picked from commit 6aed870919feb565955d6d40e23337d98ff10e7a)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This amends commit db9009721a11f482b601a228eb6d0e1658d997b0, which fixed
the *-metatypes.json creation for Makefile generators. User feedback and
the comments in the underlying CMake issue #19005 suggest that all
non-Ninja generators are affected.
Fix this by activating the work-around for all non-Ninja generators.
Pick-to: 6.5 6.6 6.7
Fixes: QTBUG-120317
Change-Id: I537ff7be9c658b7053f7f5df6cbced460be43270
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
Reviewed-by: Alexey Edelev <alexey.edelev@qt.io>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
When a `.moc` file is included in a source file and that source passed
to `qt_wrap_cpp`, Users should add the generated `.moc`s path to the
target's include path. Since we don't share anything about the output
path of generated files by `qt_wrap_cpp`, it makes sense to add in
inside `qt_wrap_cpp`. And also, the generated `.moc` file is added
to target's source to complete the dependency graph. Otherwise, Users
need to get output variable and pass it to target's sources.
* Update docs
* Add test
[ChangeLog][Build System] qt_wrap_cpp will accept .cpp files from now
on. When .cpp a file is passed to qt_wrap_cpp, TARGET parameter
becomes required. Generated .moc files are added to target's sources
inside qt_wrap_cpp. That's why the output parameter will not contain
generated .moc files.
Fixes: QTBUG-113402
Change-Id: I54dd2b1ff8e5c9ba457b1eb4f73b0a8190d9c659
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
CMake has a built in file extension list for "Source Files", that does
not include qml files. We can't extend that file list with a regex,
so we need to add qml files individually as a finalization action.
We also stuff generated files (both auto-gen as well as other generated
files) into a separate source folder, to focus the project on the user's
files.
Pick-to: 6.7
Change-Id: Ic9a4d9daad088b1874bcf81e75c776537f3ff531
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
|
|
|
|
|
|
|
|
|
|
| |
Since https://gitlab.kitware.com/cmake/cmake/-/merge_requests/8919 is merged, `qtbase` should be updated accordingly. If `CMake` is equal or greater than `3.29`. `timestamp_$<CONFIG>` is used instead of `timestamp`.
This commit reimplements 8041bfba47305352627d910930e52da496904c17 which is reverted with 4b1d96ea1b16e3eef2222de78677a4d99a87940f
Change-Id: I335e3855c1a11c404202ae7b74f0c356b8fe53bd
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
Reviewed-by: Leena Miettinen <riitta-leena.miettinen@qt.io>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Otherwise, Xcode will auto-generate schemes for all targets, including
internal targets such as foo_autogen and build-only targets such as
ZERO_CHECK and ALL_BUILD, choosing one of them at random when opening
the project for the first time.
If multiple targets get a scheme they will be sorted alphabetically.
We could prioritize them by generating a xcschememanagement.plist
file, but that would require teaching CMake about that feature.
This aligns the CMake behavior with qmake, where we also generate
schemes explicitly.
Pick-to: 6.7 6.6 6.5
Change-Id: I3756fced37a4ff7792370da10fc49169cc271ae8
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
|
|
|
|
|
|
|
|
|
| |
Allows us to hide them in a separate folder in Xcode and Visual
Studio projects.
Pick-to: 6.7
Change-Id: I5ce7884ce50198c3b0c9654bb188f38a8a679be0
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
When using one of the non-Unix makefile generators ("NMake Makfiles JOM"
or "MinGW Makefiles") then it possible to trigger an error when running
qmltyperegistrar: ..._metatypes.json: illegal value
We create the metatypes JSON file initially empty and then "fill" it
with a custom command. This command is not triggered when using Makefile
generators. See CMake upstream issue #19005.
Our work-around for that issue was only triggered for the generator
"Unix Makefiles". Now, it's triggered for all makefile generators.
Fixes: QTBUG-120317
Change-Id: I329cb0d3e9ba0997d618821e7bcbc20284561419
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
It looks like resource object targets don't need AUTOMOC as well
as other AUTOGEN tools. The only source file skips autogen explicitly,
but AUTOMOC requirement is added to the resource object targets anyway.
This disables all AUTOGEN related properties explicitly for all
resource object targets.
The problem occurs when building top-level Qt with the static library
that uses resources in tree.
Pick-to: 6.2 6.5 6.6 6.7
Change-Id: I5c968a3e34c881e7fbc5589626ab02b3b1e53968
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
[ChangeLog][CMake] Added the deployment variable QT_DEPLOY_LIBEXEC_DIR.
This variable can be used in CMake deployment scripts to install helper
binaries of a project. In particular, this directory is going to be used
for deploying the QtWebEngineProcess executable.
Pick-to: 6.7
Task-number: QTBUG-119077
Change-Id: Ia2502af696c53943ad13e3944c8debf2dfd8daee
Reviewed-by: Alexey Edelev <alexey.edelev@qt.io>
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Store the locations of INSTALL_DATA and INSTALL_LIBEXECS in
.qt/QtDeploySupport.cmake which is generated for every project.
This information will be used to locate the helper binary and resources
of QtWebEngine.
Pick-to: 6.5 6.6 6.7
Task-number: QTBUG-119077
Change-Id: I2fb6f9b31fd1dcd872365d020c8ac71db426fdec
Reviewed-by: Alexey Edelev <alexey.edelev@qt.io>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
When cross-compiling a user project from x86_64 to arm64 MSVC Windows
target, during deployment we need to deploy arm libraries.
By default because we use an x86_64 windeployqt, it always deploys
x86_64 libraries.
Make sure to pass the path to the target WoA qtpaths.bat file to
windeployqt, so it deploys arm libraries.
Pick-to: 6.5 6.6 6.7
Fixes: QTBUG-119619
Change-Id: Ib3b5498ae906726d1f9e0919333c102898b48ea9
Reviewed-by: 🌴 Alexey Edelev 🌴 <alexey.edelev@qt.io>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Oliver Wolff <oliver.wolff@qt.io>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
[ChangeLog][CMake] Added the DEPLOY_TOOL_OPTIONS argument to the
functions qt_generate_deploy_app_script and
qt_deploy_runtime_dependencies.
It doesn't make sense to map every option of the deployment tools to
arguments in our CMake deployment API. Allow the user to specify
extra arguments to windeployqt or macdeployqt.
Task-number: QTBUG-116551
Change-Id: I4cc67ab03f19101b695281e8c80f8af825bab7f6
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The _qt_internal_write_target_deploy_info function doesn't clear its
result variable, which is why we had left-over elements in the targets
variable. Some of these left-overs have a target type that's not
compatible with TARGET_RUNTIME_DLLS, leading to the CMake error:
Objects of target "lib1" referenced but is not one of the allowed
target types (EXECUTABLE, SHARED, MODULE).".
Fix this by clearing the targets variable initially.
Fixes: QTBUG-119792
Change-Id: I921aa2f0af72638ed0ed7434450a43c66c1fc9f1
Reviewed-by: Alexey Edelev <alexey.edelev@qt.io>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
When using CMake 3.19 or newer, we generate a .qt/QtDeployTargets.cmake
file per project. This contains the following information for each
deployable target:
1. The full path to the produced artifact. This will allow us to avoid
the file name heuristics when deploying QML plugins.
2. The DLLs that are needed at runtime, when using CMake 3.21 or newer
on Windows. This will allow us to deploy QML module backing libraries
and runtime DLLs of to-be-deployed targets.
Task-number: QTBUG-117948
Task-number: QTBUG-118153
Change-Id: I8a670e44f62a872f1a21174e947d87ccb8191073
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
|
|
|
|
|
|
|
|
|
|
|
|
| |
builds"
Since https://gitlab.kitware.com/cmake/cmake/-/merge_requests/8878 is
reverted, the related change in `qtbase` also should be reverted.
This reverts commit 8041bfba47305352627d910930e52da496904c17 and 7a87149c25e04f5f1cbb786fd3b8f78e94574551
Change-Id: Iae42755ffc7b2c97e9cda4c211319df767a421b0
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Since https://gitlab.kitware.com/cmake/cmake/-/merge_requests/8840 is
merged, the timestamp file for {target}_json_file.txt should be updated
for `multi-config` builds too.
A possible error message before this commit when `qt6_extract_metatypes()` is called with a newer
or equal version than `3.28` `CMake` and `Ninja Multi-Config`.
```
ninja: error: 'src/corelib/Core_autogen/timestamp', needed by 'src/corelib/meta_types/Core_json_file_list.txt', missing and no known rule to make it
```
Amends 8042bfba47305352627d910930e52da496904c17
Pick-to: 6.2 6.5 6.6
Change-Id: Ib404bd058d5f4c75501fb714c2ad9608d6852822
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Since https://gitlab.kitware.com/cmake/cmake/-/merge_requests/8564 is
merged, the timestamp file for {target}_json_file.txt should be updated
for `Cross-Config` builds.
The actual error message before this commit when CMake 3.28 is used:
```
ninja: error: 'src/corelib/Core_autogen/timestamp', needed by 'src/corelib/meta_types/Core_json_file_list.txt', missing and no known rule to make it
```
Pick-to: 6.2 6.5 6.5.3 6.6 6.6.0
Change-Id: Ib544b18b67d2d4722f3801b1f46a0e0e18e59d48
Reviewed-by: Amir Masoud Abdol <amir.abdol@qt.io>
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Application deployment must know whether the Qt installation is a
debug_and_release build - or more generally, a multi-config build with a
debug configuration. Store the following information in
QtDeploySupport.cmake that's read at installation time:
- whether Qt was built multi-config with a debug configuration
- the postfix for debug libraries
Task-number: QTBUG-109444
Pick-to: 6.5 6.6
Change-Id: I96a2120ba1a2b03125661cc829498653e37dfb0f
Reviewed-by: Alexey Edelev <alexey.edelev@qt.io>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
[ChangeLog][CMake] Added variable QT_I18N_NATIVE_LANGUAGE to specify the
native language that is used in the source code for translatable
strings.
[ChangeLog][CMake] Added keyword I18N_NATIVE_LANGUAGE to
qt_standard_project_setup to conveniently set QT_I18N_NATIVE_LANGUAGE.
Task-number: QTBUG-115845
Change-Id: I079256507685afe5eccda78beffff819292494bf
Reviewed-by: Amir Masoud Abdol <amir.abdol@qt.io>
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
[ChangeLog][CMake] Added variable QT_I18N_LANGUAGES to specify the
languages that are used for i18n in the project.
[ChangeLog][CMake] Added keyword I18N_LANGUAGES to
qt_standard_project_setup to conveniently set QT_I18N_LANGUAGES.
The call
qt_standard_project_setup(I18N_LANGUAGES hi ho)
sets the variable QT_I18N_LANGUAGES.
The target finalizers use this variable to set up CFBundleLocalizations
on Apple platforms.
qt_add_translations will be extended to read QT_I18N_LANGUAGES as well
to determine the names of .ts files if TS_FILES is not given.
Fixes: QTBUG-116716
Change-Id: I76f0753d10efb9c32947d9239e43382c9d85eb51
Reviewed-by: Amir Masoud Abdol <amir.abdol@qt.io>
|
|
|
|
|
|
|
| |
Since https://gitlab.kitware.com/cmake/cmake/-/merge_requests/8570 introduces AUTOMOC to use depfile with the Makefile generators, the depfile usage can be enabled for them in qtbase.
Change-Id: Ie18460fd2c4703ad75eb88662445ebe961d4e895
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
|
|
|
|
|
|
|
|
|
| |
The function was replacing the `>` character in generator expressions coming from `add_compile_definitions`. This was creating generator expression syntax errors. Discard generator expressions from character replacing.
Add tests for the three cases.
Fixes: QTBUG-111717
Change-Id: I694d2908738085fdf15112834f20183a9f393422
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Take 2.
Re-land previously reverted commit, due to not handling resource names
that are not valid c++ identifiers. Now we sanitize the resource names
just like rcc does by replacing non-alphanumeric characters with
underscores.
Original commit message.
During the Qt 5 -> Qt 6 and qmake -> CMake porting time frame, it was
decided to keep resources in an object file (object library), rather
than putting them directly into a static library when doing a static
Qt build, so that the build system can take care of linking the
object file directly into the executable and thus not forcing
project developers to manually initialize resources with
the Q_INIT_RESOURCE() macro in project code.
This worked for most qmake and cmake projects, but it created
difficulties for other build systems, in the sense that these projects
would have to manually link to the resource object files, otherwise
they would get link time errors about undefined resource symbols,
assuming they kept the Q_INIT_RESOURCE() calls.
If the project code didn't contain Q_INIT_RESOURCE calls, the
situation would be even worse, the linker would not error out,
and the missing resources would only be discovered at runtime.
It's also an issue in CMake projects that try to link to the
library files directly instead of using the library target names,
which means the object files would not be automatically linked in.
Many projects try to do that because we don't yet offer a convenient
way to install libraries and reuse them in other projects (the SDK
case), so projects end up shipping only the libraries, without the
resource object files.
We can improve the situation by moving the resources back into their
associated static libraries, and only keeping a static initializer as
a separate object file / object library, which references the actual
resource initializer symbol, to ensure it does not get discarded
during linking.
This way, projects that link using targets get no behavior difference,
whereas projects linking to static libraries directly can still
successfully build as long as their sources have all the necessary
Q_INIT_RESOURCE calls.
To ensure the resource symbols do not get discarded, we use a few new
private macros. We declare the resource init symbols we want to keep as
extern symbols and then assign the symbol addresses to volatile
variables.
This prevents discarding the symbols with the compilers / linkers we
care about.
It comes at the cost of an additional static initializer per resource,
but we would get the same + a bigger performance hit if we just used
Q_INIT_RESOURCE twice (once in the object lib and once in project
code), which internally needs to traverse a linked list of all
resources to check if a resource was initialized or not.
For GHS / Integrity, we also need to use a GHS-specific pragma to keep
the symbols, which we currently use in qtdeclarative to ensure qml
plugin symbols are not discarded.
The same macros will be used in a qtdeclarative change to prevent
discarding of resources when linking to static qml plugins.
A cmake-based test case is added to verify that linking to static
libraries directly, without linking to the resource initializer
object libraries, works fine as long as the project code calls
Q_INIT_RESOURCE for the relevant resource.
This reverts commit bc88bb34caf1185a25eda77ee022843c0ca988b0.
Fixes: QTBUG-91448
Task-number: QTBUG-110243
Change-Id: Idce69db0cf79d3e32916750bfa61774ced977a7e
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Alexey Edelev <alexey.edelev@qt.io>
|
|
|
|
|
|
|
|
|
|
| |
This reverts commit ce8874fc3b0bab2066080315c8774b30c038862c.
Reason for revert: Doesn't handle resource names that are invalid identifiers
Change-Id: Idf24bd9797284ce9de382a8e233d56c799a09099
Reviewed-by: Amir Masoud Abdol <amir.abdol@qt.io>
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
It does look safe to consider the value of BUILD_SHARED_LIBS in
_qt_internal_add_library. Current behavior might confuse users that
specify BUILD_SHARED_LIBS explicitly but get the library types
according to Qt build type.
[ChangeLog][CMake] qt6_add_library now considers the value of the
BUILD_SHARED_LIBS variable. If the variable is DEFINED it has
higher priority than the library type detecting logic in
qt6_add_library when adding the library targets.
Change-Id: I1c40e887c4e481424a596c870a8ff2784b08fcbb
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
During the Qt 5 -> Qt 6 and qmake -> CMake porting time frame, it was
decided to keep resources in an object file (object library), rather
than putting them directly into a static library when doing a static
Qt build, so that the build system can take care of linking the
object file directly into the executable and thus not forcing
project developers to manually initialize resources with
the Q_INIT_RESOURCE() macro in project code.
This worked for most qmake and cmake projects, but it created
difficulties for other build systems, in the sense that these projects
would have to manually link to the resource object files, otherwise
they would get link time errors about undefined resource symbols,
assuming they kept the Q_INIT_RESOURCE() calls.
If the project code didn't contain Q_INIT_RESOURCE calls, the
situation would be even worse, the linker would not error out,
and the missing resources would only be discovered at runtime.
It's also an issue in CMake projects that try to link to the
library files directly instead of using the library target names,
which means the object files would not be automatically linked in.
Many projects try to do that because we don't yet offer a convenient
way to install libraries and reuse them in other projects (the SDK
case), so projects end up shipping only the libraries, without the
resource object files.
We can improve the situation by moving the resources back into their
associated static libraries, and only keeping a static initializer as
a separate object file / object library, which references the actual
resource initializer symbol, to ensure it does not get discarded
during linking.
This way, projects that link using targets get no behavior difference,
whereas projects linking to static libraries directly can still
successfully build as long as their sources have all the necessary
Q_INIT_RESOURCE calls.
To ensure the resource symbols do not get discarded, we use a few new
private macros. We declare the resource init symbols we want to keep as
extern symbols and then assign the symbol addresses to volatile
variables.
This prevents discarding the symbols with the compilers / linkers we
care about.
It comes at the cost of an additional static initializer per resource,
but we would get the same + a bigger performance hit if we just used
Q_INIT_RESOURCE twice (once in the object lib and once in project
code), which internally needs to traverse a linked list of all
resources to check if a resource was initialized or not.
For GHS / Integrity, we also need to use a GHS-specific pragma to keep
the symbols, which we currently use in qtdeclarative to ensure qml
plugin symbols are not discarded.
The same macros will be used in a qtdeclarative change to prevent
discarding of resources when linking to static qml plugins.
A cmake-based test case is added to verify that linking to static
libraries directly, without linking to the resource initializer
object libraries, works fine as long as the project code calls
Q_INIT_RESOURCE for the relevant resource.
Fixes: QTBUG-91448
Task-number: QTBUG-110243
Change-Id: I39c325aac91e36d53c3576a39f881949c3b21e3f
Reviewed-by: Alexey Edelev <alexey.edelev@qt.io>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The install-time code path that's supposed to propagate and install the
metatypes files was never executed, because of a wrong
PARENT_SCOPE assignment and because the code was overriding the meta
type file name retrieved from a property with an empty non-existent
argument.
This caused build failures in qtdeclarative when qmlcachegen generated
invalid cpp code without having access to the qtbase foreign types.
This only happened in prefix builds.
Use the appropriate variable for the PARENT_SCOPE assignment and
remove the incorrect file name assignment.
Amends c45c32af32e5b7501065f294de67a5e6a3d1f62a
Task-number: QTBUG-115152
Change-Id: I120d53d44382a1ac6f62792ec1620add3e7b136c
Reviewed-by: Amir Masoud Abdol <amir.abdol@qt.io>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
...when using a Qt cross-built for embedded Linux and
NO_UNSUPPORTED_PLATFORM_ERROR set.
Attempting to install such a project will now give the following output:
-- Skipping runtime deployment steps. Support for installing runtime
dependencies is not implemented for this target platform (Linux, shared
Qt libs, cross-compiled).
Pick-to: 6.5 6.6
Fixes: QTBUG-114069
Change-Id: Idd2af2135d2ca3cc0e5eeafb7701e891f8a0cc25
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Extract the code that propagates metatypes files into separate
functions, so that they can be used in the qml api to propagate a qml
module backing library's metatype file to its associated plugin.
It's a bit messy due to the tech debt around installation, but the
behavior of the code in qtbase should not change.
Task-number: QTBUG-115152
Change-Id: I85dfcc4c76e9c41239dc0380920e68a3a6400815
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
|