summaryrefslogtreecommitdiffstats
path: root/Source/cmQtAutoGenInitializer.cxx
diff options
context:
space:
mode:
authorSebastian Holtermann <sebholt@xwmw.org>2018-07-22 12:26:16 (GMT)
committerSebastian Holtermann <sebholt@xwmw.org>2018-07-30 07:22:46 (GMT)
commit5776639fbfe5b8da5ca7a4fbae31936cdeff6660 (patch)
tree47304ce5639f2decb8fb4195c5d256014c8adcad /Source/cmQtAutoGenInitializer.cxx
parent2e9199b291879d9a47759faa178fb2f35b12bd64 (diff)
downloadCMake-5776639fbfe5b8da5ca7a4fbae31936cdeff6660.zip
CMake-5776639fbfe5b8da5ca7a4fbae31936cdeff6660.tar.gz
CMake-5776639fbfe5b8da5ca7a4fbae31936cdeff6660.tar.bz2
Autogen: Pass absolute include path in info file
Diffstat (limited to 'Source/cmQtAutoGenInitializer.cxx')
-rw-r--r--Source/cmQtAutoGenInitializer.cxx39
1 files changed, 20 insertions, 19 deletions
diff --git a/Source/cmQtAutoGenInitializer.cxx b/Source/cmQtAutoGenInitializer.cxx
index fd9829f..19cdd39 100644
--- a/Source/cmQtAutoGenInitializer.cxx
+++ b/Source/cmQtAutoGenInitializer.cxx
@@ -244,6 +244,21 @@ bool cmQtAutoGenInitializer::InitCustomTargets()
// Working directory
this->DirWork = cbd;
cmSystemTools::ConvertToUnixSlashes(this->DirWork);
+
+ // Include directory
+ this->DirInclude = this->DirBuild;
+ this->DirInclude += "/include";
+ if (this->MultiConfig) {
+ this->DirInclude += "_$<CONFIG>";
+ }
+ if (this->MultiConfig) {
+ for (std::string const& cfg : this->ConfigsList) {
+ std::string& dir = this->DirConfigInclude[cfg];
+ dir = this->DirBuild;
+ dir += "/include_";
+ dir += cfg;
+ }
+ }
}
// Autogen files
@@ -305,12 +320,7 @@ bool cmQtAutoGenInitializer::InitCustomTargets()
// Add autogen includes directory to the origin target INCLUDE_DIRECTORIES
if (this->Moc.Enabled || this->Uic.Enabled ||
(this->Rcc.Enabled && this->MultiConfig)) {
- std::string includeDir = this->DirBuild;
- includeDir += "/include";
- if (this->MultiConfig) {
- includeDir += "_$<CONFIG>";
- }
- this->Target->AddIncludeDirectory(includeDir, true);
+ this->Target->AddIncludeDirectory(this->DirInclude, true);
}
// Acquire rcc executable and features
@@ -833,15 +843,6 @@ bool cmQtAutoGenInitializer::SetupCustomTargets()
return false;
}
- // Configuration include directories
- std::string includeDir = "include";
- std::map<std::string, std::string> includeDirs;
- for (std::string const& cfg : this->ConfigsList) {
- std::string& dir = includeDirs[cfg];
- dir = "include_";
- dir += cfg;
- }
-
// Generate autogen target info file
if (this->Moc.Enabled || this->Uic.Enabled) {
if (this->Moc.Enabled) {
@@ -913,9 +914,9 @@ bool cmQtAutoGenInitializer::SetupCustomTargets()
MfDef("CMAKE_INCLUDE_DIRECTORIES_PROJECT_BEFORE"));
CWrite("AM_BUILD_DIR", this->DirBuild);
if (this->MultiConfig) {
- CWriteMap("AM_INCLUDE_DIR", includeDirs);
+ CWriteMap("AM_INCLUDE_DIR", this->DirConfigInclude);
} else {
- CWrite("AM_INCLUDE_DIR", includeDir);
+ CWrite("AM_INCLUDE_DIR", this->DirInclude);
}
ofs << "# Files\n";
@@ -1014,9 +1015,9 @@ bool cmQtAutoGenInitializer::SetupCustomTargets()
ofs << "# Directories\n";
CWrite("ARCC_BUILD_DIR", this->DirBuild);
if (this->MultiConfig) {
- CWriteMap("ARCC_INCLUDE_DIR", includeDirs);
+ CWriteMap("ARCC_INCLUDE_DIR", this->DirConfigInclude);
} else {
- CWrite("ARCC_INCLUDE_DIR", includeDir);
+ CWrite("ARCC_INCLUDE_DIR", this->DirInclude);
}
ofs << "# Rcc executable\n";