forked from qt-creator/qt-creator
CMakePM: Add "CMake Install" deployment step
This commit adds a "CMake Install" deployment step, which is using "cmake --install" command. "cmake --install" command has been added in CMake 3.15, this is why the minimum CMake version has been updated to 3.15. Note that CMakeBuildSystem::makeInstallCommand is still using cmake -- build --target install due to a CMake bug regarding "Ninja Multi-Config" generator, which doesn't intall all binaries via "cmake --install". Fixes: QTCREATORBUG-25880 Change-Id: I504674c380055d8ef136d344a78b80c17ecf9765 Reviewed-by: Leena Miettinen <riitta-leena.miettinen@qt.io> Reviewed-by: Eike Ziller <eike.ziller@qt.io> Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
This commit is contained in:
40
src/plugins/cmakeprojectmanager/cmakeinstallstep.h
Normal file
40
src/plugins/cmakeprojectmanager/cmakeinstallstep.h
Normal file
@@ -0,0 +1,40 @@
|
||||
// Copyright (C) 2022 The Qt Company Ltd.
|
||||
// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0+ OR GPL-3.0 WITH Qt-GPL-exception-1.0
|
||||
|
||||
#pragma once
|
||||
|
||||
#include "cmakeabstractprocessstep.h"
|
||||
|
||||
namespace Utils {
|
||||
class CommandLine;
|
||||
class StringAspect;
|
||||
} // namespace Utils
|
||||
|
||||
namespace CMakeProjectManager::Internal {
|
||||
|
||||
class CMakeInstallStep : public CMakeAbstractProcessStep
|
||||
{
|
||||
Q_OBJECT
|
||||
|
||||
public:
|
||||
CMakeInstallStep(ProjectExplorer::BuildStepList *bsl, Utils::Id id);
|
||||
|
||||
private:
|
||||
Utils::CommandLine cmakeCommand() const;
|
||||
|
||||
void processFinished(bool success) override;
|
||||
|
||||
void setupOutputFormatter(Utils::OutputFormatter *formatter) override;
|
||||
QWidget *createConfigWidget() override;
|
||||
|
||||
friend class CMakeInstallStepConfigWidget;
|
||||
Utils::StringAspect *m_cmakeArguments = nullptr;
|
||||
};
|
||||
|
||||
class CMakeInstallStepFactory : public ProjectExplorer::BuildStepFactory
|
||||
{
|
||||
public:
|
||||
CMakeInstallStepFactory();
|
||||
};
|
||||
|
||||
} // namespace CMakeProjectManager::Internal
|
||||
Reference in New Issue
Block a user