Android minimum API level for Qt 6 is 23, this reflects that to some
instances that still mention 21.
Change-Id: I996f3ed3af14dca114129351d6ea06afcb8f45f5
Reviewed-by: Andy Shaw <andy.shaw@qt.io>
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
00a1e5da7e wrongfully added parts of
QtPlatformAndroid.cmake which were removed in
32121e9882. This removed the part in
question again
Change-Id: Ie18968e6a165f52c68f4941ced6add266985bc48
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
All system frameworks use 'A' instead of the major version of the
framework, and Xcode's code signing assumes that the framework version
is 'A' when signing embedded frameworks (FB7323980), so leave the
version 'A'. This is also what Apple recommends.
Change-Id: Idbf2e30e156c3e869da8f75731e568524d9407e5
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
Offer compatibility wrapper functions until we update all of the Qt
repos to use the new names.
Task-number: QTBUG-86815
Change-Id: I5826a4116f52a8509db32601ef7c200f9bd331de
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
Reviewed-by: Kai Koehne <kai.koehne@qt.io>
When re-doing in a top-level build, we did not read the config.opt file
from the top-level directory.
Also, the config.opt file should not contain the -top-level argument.
This is an internal option, and on Windows, it was already missing. The
information whether we're doing a top-level build is now passed in the
CMake variable TOP_LEVEL.
Change-Id: Iaecd7306a4b6d9ad494684c201cf12f8e74d684b
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
Having ${QT_BUILD_DIR}/include as include path is not enough for
modules outside of qtbase. They also need to pick up headers from e.g.
Qt Core, which are available only in "${CMAKE_INSTALL_PREFIX}/include"
This amends db21bad936
Fixes: QTBUG-82615
Change-Id: Ib003a66ce039bf1ab6e21a3b1cd86923207eb3db
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
We must use the LIBRT location instead of LIBRT_FOUND which is not set anywhere.
I failed to replace this one in my previous patch.
Change-Id: I6e2df82c31e29018d99afec1eecfb80a321fddd4
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
qt_add_test supports now QT_TEST_SERVER_LIST, which will add the test
servers as docker test fixtures.
The docker server will be started before the test is run, and stopped
after the test is run.
Running the tests in parallel is not supported.
Docker tests are currently only supported on Linux hosts.
Task-number: QTBUG-85034
Change-Id: If3cefe05c5dec19c14b05d2fa8b01a0b6d95e259
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
Avoids a linking error when the library is not found as
find_library sets GLESv2_LIBRARY to GLESv2-NOTFOUND
Change-Id: I7ddc15483276e0be0c78b67b760c4d9188758270
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
Reviewed-by: Cristian Adam <cristian.adam@qt.io>
If a consumer wants to cross-compile a Qt app, they need to provide
the host Qt path location.
When building Qt in the CI we embed the Qt host path into the
generated CMake toolchain file for convenient building of other Qt
modules.
But once Qt is built, packaged and installed on a user's machine, most
likely the Qt host path will not be the same. In such a case, if the
user wants to use the convenience toolchain, they should explicitly
provide the Qt host path via the QT_HOST_PATH and
QT_HOST_PATH_CMAKE_DIR variables.
Show an error message if the values are not provided or don't exist
on the file system.
It's possible that in the future the Qt installer will patch the
toolchain file, or provide additional info, to point to the host
Qt installation so that the user doesn't have to do it manually.
But until that's done, a friendly error message is a good way to
inform the user what they should do.
Task-number: QTBUG-83999
Change-Id: I26291e3c47bb77375f8a5ce7b848c0382a660ca9
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Public consumers of the qt toolchain file will most likely not have
their compilers in the same location where they were on the Qt build
machine.
Only set the compiler paths if none was set already, and the paths
actually exist.
This seems to become a trend in the generated toolchain file, and is
only a stop-gap solution.
A proper solution (two different toolchain files) may follow.
Task-number: QTBUG-83999
Change-Id: I7a603af447333a45c65b98e299ee109932d16517
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
A previous change accidentally broke what we we set for
QT_HOST_PATH and QT_HOST_PATH_CMAKE_DIR.
The QT_HOST_PATH variable should use an absolute path as it was
done before.
The QT_HOST_PATH_CMAKE_DIR variable incorrectly used the value of
"${QT_HOST_PATH}" instead of "${QT_HOST_PATH_CMAKE_DIR}".
Fix both of these, and change the names of intermediate variables
to be consistent.
Amends a6a3b82ffb
Task-number: QTBUG-85240
Change-Id: I328a7edee12a13ff793684e8a0a4c2e03204eca4
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
This reverts commit b0c51f86f4.
The build failure caused by 58c1c6ee5c has
been fixed.
Change-Id: Ic7458d54c7a874588e8b1bfeca61df1842763656
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
This reverts commit 6e1a570dc8.
The build failure caused by 58c1c6ee5c has
been fixed.
Change-Id: I67acaa2d1dd5fc88c205b054252be2e6e26898c7
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
...and fix the build errors the original change caused.
This reverts commit 127fb8bb55.
Change-Id: I4006b32734a51c5d101dd73c957f81d2a0f84ba1
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
This reverts commit 58c1c6ee5c.
This lead to configuration errors on some machines, blocking
development.
Change-Id: I744f6cc95fbaa273519ab8fc8fb492b87f5729b8
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
This reverts commit a3cb002511.
This lead to configuration errors on some machines, blocking
development.
Change-Id: Ibb785c96c7d85692a6e22a73e086119eb571df71
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
This reverts commit 3685483c4b.
This lead to configuration errors on some machines, blocking
development.
Change-Id: I309cdd55a8ef64899afcbeca54458d1c6d686951
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
Every public dependency of a Qt module results in a find_package call in
the consuming project. But not all public dependencies are mandatory.
For example, vulkan is only needed if the user project actually uses Qt
classes that pull in vulkan headers.
This patch adds the option MARK_OPTIONAL to qt_find_package.
Dependencies that are marked as optional will not produce an error on
find failure.
Task-number: QTBUG-86421
Change-Id: Ia767e7f36991e236582c7509cbd37ea3487bb695
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
...in code. The actual number of calls at runtime does not change.
The reason for this stunt is that we want to replace find_dependency
with find_package at runtime for optional dependencies, and this will
reduce the diff size of the next commit.
Change-Id: I304fdf09c69fea7b6d4adabf515712eb097f8c86
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
The find_dependency() macro calls return() on failure, meaning any code
after it will be ignored, thus checking any XXX_FOUND variables after
find_dependency() is pointless.
Fix the places where we use find_dependency() and set the "failed" state
before the call and the "success" state afterwards.
Change-Id: Ia5239c704f02a9bec972210374ffed7808b14055
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
This is needed for qtwayland, where QtWaylandCompositor package should
call find_package(QtWaylandScanner) in the 'Tools' section of the
ModuleDependencies.cmake file, rather than the regular 'Qt' section.
This takes care of handling host path prefixes, to ensure that a host
package is found even when tools have also been cross-compiled via the
QT_BUILD_TOOLS_WHEN_CROSSCOMPILING option.
Task-number: QTBUG-83968
Change-Id: I4725a630214d053105fb6d2a0f7c5ff6128d13f9
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
qt_apply_rpaths takes into account properties like MACOSX_BUNDLE. This
property might not yet be set when qt_internal_add_app is called, but
later.
To handle that, move the call of qt_apply_rpaths to
qt_internal_finalize_app.
As a result, the installed apps will have 2 rpaths, the $ORIGIN style
relocatable one, and an absolute path one pointing to the Qt
prefix/lib. The last one might be unnecessary.
Fixes: QTBUG-86514
Change-Id: I25e0d695c78c8b5703e94c99cc2457f772721456
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
win32-clang-g++/qmake.conf did define
QMAKE_CFLAGS_WARN_ON += -Wextra -Wno-ignored-attributes
probably for the same reason.
Change-Id: I14b66f2555949c03a2ea996923e31f5ec9f7105a
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
Some repos/modules don't have configure.json files and thus no
qt_cmdline.cmake files. Make qt-configure-module check for the file's
existence. As drive-by fix, surround the configure.cmake's path by
double quotes.
Change-Id: If1a91a0bba0c2fd282cfa08fa6ff2bb20f0a15ba
Reviewed-by: Cristian Adam <cristian.adam@qt.io>
For modules that have MODULE_INCLUDE_NAME set (for example ActiveQt) we
must use this name for the installation rules too.
Fixes: QTBUG-86484
Change-Id: I1b97cf534ea5e41655c7b3fdd0330b2f58356a3a
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
This configure switch sets the CMake variable
CMAKE_INTERPROCEDURAL_OPTIMIZATION_<CONFIG> per release config to ON.
The feature 'ltcg' is enabled if any of the variables
CMAKE_INTERPROCEDURAL_OPTIMIZATION,
CMAKE_INTERPROCEDURAL_OPTIMIZATION_<CONFIG> are ON.
In order to implement the check, configurejson2cmake had to be extended
to be able to write extra CMake code before and after the feature
definition. This extra code can be added to a feature mapping below the
keys "cmakePrelude" and "cmakeEpilogue".
Task-number: QTBUG-85373
Change-Id: Ia2eb907edcf087f137977a9b090705397f83eb05
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Cristian Adam <cristian.adam@qt.io>
Add a convenience script to configure a Qt module separately.
This script reads and interprets the qt_cmdline.cmake files of the
Qt module to be configured and eventually calls qt-cmake-private.
Example usage:
<install-prefix>/bin/qt-configure-module <source-root>/qtdeclarative
-qml-network -- --trace-expand --trace-redirect=cmake.trace
Change-Id: I026f1a050cd3f4df740611c32ba8c03161bba7a3
Reviewed-by: Cristian Adam <cristian.adam@qt.io>
Make this file parsable by tools that are less lenient than github.
Triple-backquotes are for fenced code blocks. Inline code uses backticks
(or double backticks if you have code with backticks).
Change-Id: Ic49d946fbcaa6f7e97702eadf4a0b0c726fc3217
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
If '-make examples -no-compile-examples' was specified, sources of Qt's
examples would be installed, but the examples would not be built.
This switch has always been a source for confusion and is only
interesting for distributors, who can just package the examples
directory tree.
Change-Id: I0291d70e4951d98b553a4abf217db49d05316d3a
Reviewed-by: Kai Koehne <kai.koehne@qt.io>
The include directive was incorrectly written.
This amends 5c092c2b40.
Change-Id: Ia72ca3a5d5e1486ade4d71a764550d36979640f6
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
We need to use the imported host tracegen target to generate files, not
the one we're going to cross-build.
This amends 5c092c2b40.
Change-Id: Ib74dd2d87110383c31216872eb55bebf5d90df37
Reviewed-by: Samuli Piippo <samuli.piippo@qt.io>
qt_record_extra_package_dependency is called by qtwayland to register a
dependency between the qtwaylandscanner tool and the waylandscanner
tool.
When cross-compiling the tools in a Yocto environment, the adjusted
target name was not taken into account.
Task-number: QTBUG-83968
Change-Id: Ibf7b94876bf29827cf0d9c9bb471f359ef6ff15f
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
This works around linking issues when doing yocto non-prefix Qt
builds, because CMake does not add -rpath-link flags even though it
probably should.
Task-number: QTBUG-86533
Change-Id: Iaaf246ac71ca05d9369ceb6eb9c4a1e206c42839
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
I accidentally noticed the message in a CI job, but it didn't fail the
build because the FATAL_ERRO was considered as another text token to
print, instead of a command keyword.
Change-Id: I0e30ebacbed32d1017f9ded681cd6b15cbc32573
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
The qt_build_internals_disable_pkg_config_if_needed function didn't
actually check if the pkg-config executable is available when turning
the pkg-config feature on.
This broke certain configurations like Android (on some hosts).
Try to find the executable and take that into account when computing
the value of the feature.
Task-number: QTBUG-85399
Change-Id: Ie79c637f2d2b689c392862c90075d309906fe506
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
The generated toolchain file embedded windows style paths for the
android sdk and chainloaded toolchain. This caused CMake does fail at
configure time while trying to evaluate backslashes as escape chars.
Also syncqt was searched for in libexec, which is not the right
directory on Windows. Use the host info package to get the location of
the 'libexec'.
Task-number: QTBUG-85399
Task-number: QTBUG-85911
Task-number: QTBUG-86053
Change-Id: I1b15ce84496d52c3fda2f65138e1eac43bc95c9e
Reviewed-by: Cristian Adam <cristian.adam@qt.io>
Rather than force setting the apple sysroot and Qt host paths, first
check if they are not already defined on the command line and if they
aren't, check that the paths with which Qt was configured exist.
The goal of the patch is to not set invalid paths, like when using a
Qt built in the CI, which will have a different host path / sysroot
compared to what a user has locally.
Task-number: QTBUG-85240
Change-Id: Ic37566b4fa845d8d1b4e4b5ba7fa4be769e99ca8
Reviewed-by: Cristian Adam <cristian.adam@qt.io>
Using find_library() to find an Xcode framework will end up embedding
the absolute path of the framework into INTERFACE_LINK_LIBRARIES.
A different machine might not have the SDK installed in the same
location, which will cause build failures. This happens in our CI
because Xcode is installed to /Applications/Xcode11.app.
To fix this, replace all system framework paths with
'-framework Foo' flags instead.
We already do this for OpenGL and OpenGL ES.
In the future we might want to convert these into full standalone
FindFoo scripts that expose proper targets.
Fixes: QTBUG-86299
Task-number: QTBUG-86422
Task-number: QTBUG-85240
Change-Id: I22b2b2d1d9e92108098d3974105e3758978cd8e2
Reviewed-by: Cristian Adam <cristian.adam@qt.io>
We don't support older compilers from before they accepted
the architecture codenames.
Change-Id: If13a10ed95b34007858bfffd1631a08b425fa9c3
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
This was added for Qt 5 in 780137d585 but
apparently the change was never ported over to CMake.
Fixes: QTBUG-86452
Change-Id: If13a10ed95b34007858bfffd1631a084370a3232
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
Until now, QtProcessConfigureArgs.cmake could only handle qtbase and the
top-level build. Add the variable MODULE_ROOT that the user can point to
the module that is to be configured.
Example - QtDeclarative can now be configured like this:
cd qtdeclarative-build-dir
echo -qml-network > config.opt
cmake -DOPTFILE=config.opt -DMODULE_ROOT=<source-root>/qtdeclarative \
-DCMAKE_COMMAND=<install-prefix>/bin/qt-cmake-private \
-P <source-root>/qtbase/cmake/QtProcessConfigureArgs.cmake
A convenience script that saves the user from entering this unwieldy
incantation will be added in a subsequent commit.
Change-Id: If46103de3a8eb84b15e7600ebfec25544451e1d5
Reviewed-by: Cristian Adam <cristian.adam@qt.io>
We never passed a valid target name to qt_apply_rpaths.
This amends fde98f7794.
Task-number: QTBUG-85399
Change-Id: I1c023ce30a3a8b5ec43d020373960d19fe20f59a
Reviewed-by: Assam Boudjelthia <assam.boudjelthia@qt.io>