diff options
| author | Alexandru Croitor <alexandru.croitor@qt.io> | 2020-08-12 19:12:13 +0200 |
|---|---|---|
| committer | Alexandru Croitor <alexandru.croitor@qt.io> | 2020-08-13 19:45:29 +0200 |
| commit | 9e044765ec88ee32781278f44a25746744dd48ec (patch) | |
| tree | 557d6a10c0a5b22e2c7f045f85498d0ec2803871 /src/network/access/qnetworkreply.cpp | |
| parent | 707d29d5d7824063c6dd84295cc82636444e6d6a (diff) | |
CMake: Fix empty value of CMAKE_SIZEOF_VOID_P when looking for tools
Our initial approach to looking for host Qt tools when cross-compiling
to a platform with a different architecture bitness compared to the
host one was to unset CMAKE_SIZEOF_VOID_P before calling
find_package(Qt6FooTools) and then restoring the value.
That works to bypass the architecture bitness test in the
ConfigVersion files, but it also influences the paths that
find_package() searches in, specifically the lib<arch> paths like
/usr/lib64 will not be searched in.
Fortunately since CMake 3.14, write_basic_package_version_file() can
take an additional ARCH_INDEPENDENT parameter. This disables the
architecture bitness test when looking for the package, while allowing
to still search in the /usr/lib64 like paths.
Use it when creating the QtFooToolConfigVersion.cmake files.
One could argue we should actually check if the tool executables could
run on the host system where find_package is called for
cross-compilation.
We could do that in another change if the problem ever arises.
Amends 03aa74e40d8f1270e1bb28d0791e5bc376ffa0b7
Amends 914b367c7f6a117130b8a56338c46a8102a1f77f
Change-Id: I1181ff637ac80064a6a8538170b28a41743fc90c
Fixes: QTBUG-81672
Reviewed-by: Christophe Giboudeaux <christophe@krop.fr>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
Diffstat (limited to 'src/network/access/qnetworkreply.cpp')
0 files changed, 0 insertions, 0 deletions
