Fix issue with deploy step not getting valid abi with CMake

With CMake, it seems that the abi was being empty string because
looking for ANDROID_ABIS is not defined and instead there's ANDROID_ABI.

Also make sure to handle the case of ANDROID_ABIS, which might be
declared in future versions like Qt 6.3 which can support multi-abi
builds.

Change-Id: I805c5c25409a4e20a237b8747082d256bd72e275
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
This commit is contained in:
Assam Boudjelthia
2021-09-04 23:21:56 +03:00
parent c141b0d8f9
commit 7bf268114d
2 changed files with 9 additions and 2 deletions

View File

@@ -155,11 +155,15 @@ bool AndroidDeployQtStep::init()
if (!info.isValid()) // aborted
return false;
const BuildSystem *bs = buildSystem();
auto selectedAbis = bs->property(Constants::ANDROID_ABIS).toStringList();
const QString buildKey = target()->activeBuildKey();
auto selectedAbis = buildSystem()->property(Constants::ANDROID_ABIS).toStringList();
if (selectedAbis.isEmpty())
selectedAbis = bs->extraData(buildKey, Constants::ANDROID_ABIS).toStringList();
if (selectedAbis.isEmpty())
selectedAbis = buildSystem()->extraData(buildKey, Constants::ANDROID_ABIS).toStringList();
selectedAbis.append(bs->extraData(buildKey, Constants::AndroidArch).toString());
const QtSupport::BaseQtVersion * const qt = QtSupport::QtKitAspect::qtVersion(kit());
if (qt && qt->supportsMultipleQtAbis() && !selectedAbis.contains(info.cpuAbi.first())) {

View File

@@ -143,6 +143,9 @@ QVariant CMakeTargetNode::data(Utils::Id role) const
if (role == Android::Constants::AndroidArch)
return value(Android::Constants::ANDROID_ABI);
if (role == Android::Constants::ANDROID_ABIS)
return value(Android::Constants::ANDROID_ABIS);
if (role == Android::Constants::AndroidSoLibPath)
return values(Android::Constants::ANDROID_SO_LIBS_PATHS);