forked from qt-creator/qt-creator
CMakePM: Add support for QNX 7.1 and Qt 6
By setting CMAKE_TOOLCHAIN_FILE to the qt6 toolchain file all the needed bits to compile agains Qt6 get resolved automagically. Change-Id: I43084842f98a4385acedd4865aaf7e26f25a351e Reviewed-by: Eike Ziller <eike.ziller@qt.io>
This commit is contained in:
@@ -38,6 +38,7 @@
|
||||
|
||||
#include <android/androidconstants.h>
|
||||
#include <ios/iosconstants.h>
|
||||
#include <qnx/qnxconstants.h>
|
||||
#include <webassembly/webassemblyconstants.h>
|
||||
|
||||
#include <coreplugin/find/itemviewfind.h>
|
||||
@@ -789,6 +790,11 @@ static bool isWebAssembly(const Kit *k)
|
||||
return DeviceTypeKitAspect::deviceTypeId(k) == WebAssembly::Constants::WEBASSEMBLY_DEVICE_TYPE;
|
||||
}
|
||||
|
||||
static bool isQnx(const Kit *k)
|
||||
{
|
||||
return DeviceTypeKitAspect::deviceTypeId(k) == Qnx::Constants::QNX_QNX_OS_TYPE;
|
||||
}
|
||||
|
||||
static QStringList defaultInitialCMakeArguments(const Kit *k, const QString buildType)
|
||||
{
|
||||
// Generator:
|
||||
@@ -963,7 +969,7 @@ CMakeBuildConfiguration::CMakeBuildConfiguration(Target *target, Id id)
|
||||
}
|
||||
}
|
||||
|
||||
if (isWebAssembly(k)) {
|
||||
if (isWebAssembly(k) || isQnx(k)) {
|
||||
const QtSupport::BaseQtVersion *qt = QtSupport::QtKitAspect::qtVersion(k);
|
||||
if (qt && qt->qtVersion().majorVersion >= 6)
|
||||
initialArgs.append(CMAKE_QT6_TOOLCHAIN_FILE_ARG);
|
||||
|
Reference in New Issue
Block a user