Autogen: Fix configuration suffix initialization

The configuration suffix was used before it was initialized.
This commit is contained in:
Sebastian Holtermann 2017-08-05 12:46:10 +02:00
parent ddd6f0db1e
commit 74a1b8ebde
2 changed files with 7 additions and 9 deletions

View File

@ -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);
}
}

View File

@ -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);