forked from qt-creator/qt-creator
CMake generator: Include qt control configuration file in executable
Task-number: QDS-5815 Change-Id: I8ea049c60ce2f0217e3598e2a2a92dad7a776449 Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
This commit is contained in:
@@ -576,6 +576,8 @@ bool generateMainCpp(const FilePath &dir)
|
||||
for (EnvironmentItem &envItem : buildSystem->environment()) {
|
||||
QString key = envItem.name;
|
||||
QString value = envItem.value;
|
||||
if (isFileResource(value))
|
||||
value.prepend(":/");
|
||||
environment.append(QString(ENV_HEADER_VARIABLE_LINE).arg(key).arg(value));
|
||||
}
|
||||
QString envHeaderContent = GenerateCmake::readTemplate(ENV_HEADER_TEMPLATE_PATH)
|
||||
@@ -597,7 +599,17 @@ bool generateMainQml(const FilePath &dir)
|
||||
return GenerateCmake::queueFile(filePath, content);
|
||||
}
|
||||
|
||||
const QStringList resourceFileLocations = {"qtquickcontrols2.conf"};
|
||||
|
||||
bool isFileResource(QString &relativeFilePath)
|
||||
{
|
||||
if (resourceFileLocations.contains(relativeFilePath))
|
||||
return true;
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
}
|
||||
} //GenerateEntryPoints
|
||||
|
||||
} //QmlDesigner
|
||||
|
||||
|
||||
Reference in New Issue
Block a user