summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--Source/cmQtAutoGenerators.cxx36
-rw-r--r--Source/cmQtAutoGenerators.h2
2 files changed, 18 insertions, 20 deletions
diff --git a/Source/cmQtAutoGenerators.cxx b/Source/cmQtAutoGenerators.cxx
index 8bf41f8..e3d20cf 100644
--- a/Source/cmQtAutoGenerators.cxx
+++ b/Source/cmQtAutoGenerators.cxx
@@ -312,8 +312,9 @@ bool cmQtAutoGenerators::ReadAutogenInfoFile(
cmSystemTools::ExpandListArgument(
GetConfigDefinition(makefile, "AM_MOC_COMPILE_DEFINITIONS", config),
this->MocDefinitions);
- this->MocInfoIncludes =
- GetConfigDefinition(makefile, "AM_MOC_INCLUDES", config);
+ cmSystemTools::ExpandListArgument(
+ GetConfigDefinition(makefile, "AM_MOC_INCLUDES", config),
+ this->MocIncludePaths);
cmSystemTools::ExpandListArgument(
makefile->GetSafeDefinition("AM_MOC_OPTIONS"), this->MocOptions);
@@ -411,7 +412,7 @@ void cmQtAutoGenerators::SettingsFileRead(cmMakefile* makefile,
std::string& str = this->SettingsStringMoc;
str += JoinOptionsList(this->MocDefinitions);
str += " ~~~ ";
- str += this->MocInfoIncludes;
+ str += JoinOptionsList(this->MocIncludePaths);
str += " ~~~ ";
str += JoinOptionsList(this->MocOptions);
str += " ~~~ ";
@@ -513,22 +514,19 @@ void cmQtAutoGenerators::Init(cmMakefile* makefile)
std::list<std::string> mocIncludes;
{
std::set<std::string> frameworkPaths;
- {
- std::vector<std::string> incPaths;
- cmSystemTools::ExpandListArgument(this->MocInfoIncludes, incPaths);
- for (std::vector<std::string>::const_iterator it = incPaths.begin();
- it != incPaths.end(); ++it) {
- const std::string& path = *it;
- mocIncludes.push_back("-I" + path);
- // Extract framework path
- if (cmHasLiteralSuffix(path, ".framework/Headers")) {
- // Go up twice to get to the framework root
- std::vector<std::string> pathComponents;
- cmsys::SystemTools::SplitPath(path, pathComponents);
- std::string frameworkPath = cmsys::SystemTools::JoinPath(
- pathComponents.begin(), pathComponents.end() - 2);
- frameworkPaths.insert(frameworkPath);
- }
+ for (std::vector<std::string>::const_iterator it =
+ this->MocIncludePaths.begin();
+ it != this->MocIncludePaths.end(); ++it) {
+ const std::string& path = *it;
+ mocIncludes.push_back("-I" + path);
+ // Extract framework path
+ if (cmHasLiteralSuffix(path, ".framework/Headers")) {
+ // Go up twice to get to the framework root
+ std::vector<std::string> pathComponents;
+ cmsys::SystemTools::SplitPath(path, pathComponents);
+ std::string frameworkPath = cmsys::SystemTools::JoinPath(
+ pathComponents.begin(), pathComponents.end() - 2);
+ frameworkPaths.insert(frameworkPath);
}
}
// Append framework includes
diff --git a/Source/cmQtAutoGenerators.h b/Source/cmQtAutoGenerators.h
index 2842660..8206f23 100644
--- a/Source/cmQtAutoGenerators.h
+++ b/Source/cmQtAutoGenerators.h
@@ -144,10 +144,10 @@ private:
std::string SettingsStringUic;
std::string SettingsStringRcc;
// - Moc
- std::string MocInfoIncludes;
std::string MocCppFilenameRel;
std::string MocCppFilenameAbs;
std::vector<std::string> MocSkipList;
+ std::vector<std::string> MocIncludePaths;
std::vector<std::string> MocIncludes;
std::vector<std::string> MocDefinitions;
std::vector<std::string> MocOptions;