forked from qt-creator/qt-creator
QMake: Fix build device root
Fixes: QTCREATORBUG-29140 Change-Id: I85a7ea54c9006079c1c270ded0a5bd9848db1408 Reviewed-by: <github-actions-qt-creator@cristianadam.eu> Reviewed-by: hjk <hjk@qt.io>
This commit is contained in:
@@ -26,6 +26,7 @@
|
|||||||
#include <projectexplorer/buildsteplist.h>
|
#include <projectexplorer/buildsteplist.h>
|
||||||
#include <projectexplorer/buildtargetinfo.h>
|
#include <projectexplorer/buildtargetinfo.h>
|
||||||
#include <projectexplorer/deploymentdata.h>
|
#include <projectexplorer/deploymentdata.h>
|
||||||
|
#include <projectexplorer/devicesupport/idevice.h>
|
||||||
#include <projectexplorer/extracompiler.h>
|
#include <projectexplorer/extracompiler.h>
|
||||||
#include <projectexplorer/headerpath.h>
|
#include <projectexplorer/headerpath.h>
|
||||||
#include <projectexplorer/projectexplorer.h>
|
#include <projectexplorer/projectexplorer.h>
|
||||||
@@ -1452,8 +1453,12 @@ void QmakeBuildSystem::testToolChain(ToolChain *tc, const FilePath &path) const
|
|||||||
|
|
||||||
QString QmakeBuildSystem::deviceRoot() const
|
QString QmakeBuildSystem::deviceRoot() const
|
||||||
{
|
{
|
||||||
if (projectFilePath().needsDevice())
|
IDeviceConstPtr device = BuildDeviceKitAspect::device(target()->kit());
|
||||||
return projectFilePath().withNewPath("/").toFSPathString();
|
QTC_ASSERT(device, return {});
|
||||||
|
FilePath deviceRoot = device->rootPath();
|
||||||
|
if (deviceRoot.needsDevice())
|
||||||
|
return deviceRoot.toFSPathString();
|
||||||
|
|
||||||
return {};
|
return {};
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user