summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSebastian Holtermann <sebholt@xwmw.org>2017-08-05 10:46:10 (GMT)
committerSebastian Holtermann <sebholt@xwmw.org>2017-08-05 10:46:10 (GMT)
commit74a1b8ebdeaca81e0654a7e40f78c36cef265025 (patch)
tree7f0993e13f649c90b74a4c991684844affeea37b
parentddd6f0db1ea7e1cda13ce7f86361193548a6c47d (diff)
downloadCMake-74a1b8ebdeaca81e0654a7e40f78c36cef265025.zip
CMake-74a1b8ebdeaca81e0654a7e40f78c36cef265025.tar.gz
CMake-74a1b8ebdeaca81e0654a7e40f78c36cef265025.tar.bz2
Autogen: Fix configuration suffix initialization
The configuration suffix was used before it was initialized.
-rw-r--r--Source/cmQtAutoGeneratorInitializer.cxx10
-rw-r--r--Source/cmQtAutoGenerators.cxx6
2 files changed, 7 insertions, 9 deletions
diff --git a/Source/cmQtAutoGeneratorInitializer.cxx b/Source/cmQtAutoGeneratorInitializer.cxx
index 98d92bd..ab247cb 100644
--- a/Source/cmQtAutoGeneratorInitializer.cxx
+++ b/Source/cmQtAutoGeneratorInitializer.cxx
@@ -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);
}
}
diff --git a/Source/cmQtAutoGenerators.cxx b/Source/cmQtAutoGenerators.cxx
index 56267d0..092bd2d 100644
--- a/Source/cmQtAutoGenerators.cxx
+++ b/Source/cmQtAutoGenerators.cxx
@@ -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);