Commit 74a1b8eb authored by Sebastian Holtermann's avatar Sebastian Holtermann
Browse files

Autogen: Fix configuration suffix initialization

The configuration suffix was used before it was initialized.
parent ddd6f0db
......@@ -796,13 +796,11 @@ void cmQtAutoGeneratorInitializer::InitializeAutogenTarget(
// Add autogen includes directory to the origin target INCLUDE_DIRECTORIES
if (mocEnabled || uicEnabled) {
std::string includeDir = autogenBuildDir + "/include";
if (multiConfig) {
target->AddIncludeDirectory(autogenBuildDir + "/include_$<CONFIG>",
true);
} else {
target->AddIncludeDirectory(autogenBuildDir + "/include", true);
includeDir += "_$<CONFIG>";
}
target->AddIncludeDirectory(includeDir, true);
}
#if defined(_WIN32) && !defined(__CYGWIN__)
......@@ -1017,7 +1015,7 @@ void cmQtAutoGeneratorInitializer::SetupAutoGenerateTarget(
if (IsMultiConfig(target->GetGlobalGenerator())) {
for (std::vector<std::string>::const_iterator it = configs.begin();
it != configs.end(); ++it) {
configSuffix[*it] = "_" + *it;
configSuffix[*it] = cmOutputConverter::EscapeForCMake("_" + *it);
}
}
......
......@@ -366,6 +366,9 @@ bool cmQtAutoGenerators::ReadAutogenInfoFile(
return false;
}
// -- Meta
InfoGetConfig(makefile, "AM_CONFIG_SUFFIX", config, this->ConfigSuffix);
// - Old settings file
{
this->SettingsFile = cmSystemTools::CollapseFullPath(targetDirectory);
......@@ -375,9 +378,6 @@ bool cmQtAutoGenerators::ReadAutogenInfoFile(
this->SettingsFile += ".cmake";
}
// -- Meta
InfoGetConfig(makefile, "AM_CONFIG_SUFFIX", config, this->ConfigSuffix);
// - Files and directories
InfoGet(makefile, "AM_CMAKE_SOURCE_DIR", this->ProjectSourceDir);
InfoGet(makefile, "AM_CMAKE_BINARY_DIR", this->ProjectBinaryDir);
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment