CMakePM: Add installDir CMakePresets support

Is part of CMakePrests v3, and slipped at the implementation time.

Task-number: QTCREATORBUG-24555
Change-Id: Id3ce90c0a979d44287fc03ae1dd49a64e964cdf2
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
This commit is contained in:
Cristian Adam
2022-10-20 16:22:28 +02:00
parent 430ff621aa
commit bf83f63a13
6 changed files with 53 additions and 0 deletions

View File

@@ -177,6 +177,8 @@ bool parseConfigurePresets(const QJsonValue &jsonValue,
preset.generator = object.value("generator").toString();
if (object.contains("binaryDir"))
preset.binaryDir = object.value("binaryDir").toString();
if (object.contains("installDir"))
preset.installDir = object.value("installDir").toString();
if (object.contains("toolchainFile"))
preset.toolchainFile = object.value("toolchainFile").toString();
if (object.contains("cmakeExecutable"))
@@ -462,6 +464,9 @@ void PresetsDetails::ConfigurePreset::inheritFrom(const ConfigurePreset &other)
if (!binaryDir && other.binaryDir)
binaryDir = other.binaryDir;
if (!installDir && other.installDir)
installDir = other.installDir;
if (!cmakeExecutable && other.cmakeExecutable)
cmakeExecutable = other.cmakeExecutable;