forked from qt-creator/qt-creator
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:
@@ -155,11 +155,15 @@ bool AndroidDeployQtStep::init()
|
|||||||
if (!info.isValid()) // aborted
|
if (!info.isValid()) // aborted
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
|
const BuildSystem *bs = buildSystem();
|
||||||
|
auto selectedAbis = bs->property(Constants::ANDROID_ABIS).toStringList();
|
||||||
|
|
||||||
const QString buildKey = target()->activeBuildKey();
|
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())
|
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());
|
const QtSupport::BaseQtVersion * const qt = QtSupport::QtKitAspect::qtVersion(kit());
|
||||||
if (qt && qt->supportsMultipleQtAbis() && !selectedAbis.contains(info.cpuAbi.first())) {
|
if (qt && qt->supportsMultipleQtAbis() && !selectedAbis.contains(info.cpuAbi.first())) {
|
||||||
|
@@ -143,6 +143,9 @@ QVariant CMakeTargetNode::data(Utils::Id role) const
|
|||||||
if (role == Android::Constants::AndroidArch)
|
if (role == Android::Constants::AndroidArch)
|
||||||
return value(Android::Constants::ANDROID_ABI);
|
return value(Android::Constants::ANDROID_ABI);
|
||||||
|
|
||||||
|
if (role == Android::Constants::ANDROID_ABIS)
|
||||||
|
return value(Android::Constants::ANDROID_ABIS);
|
||||||
|
|
||||||
if (role == Android::Constants::AndroidSoLibPath)
|
if (role == Android::Constants::AndroidSoLibPath)
|
||||||
return values(Android::Constants::ANDROID_SO_LIBS_PATHS);
|
return values(Android::Constants::ANDROID_SO_LIBS_PATHS);
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user