diff options
author | Sebastian Holtermann <sebholt@xwmw.org> | 2017-02-16 10:10:46 (GMT) |
---|---|---|
committer | Brad King <brad.king@kitware.com> | 2017-02-21 15:12:53 (GMT) |
commit | ddf940725e8af095b1c02606aeea64cc9baaf572 (patch) | |
tree | 285a905e3129de252c446275b8bc2af796b13a0a /Source/cmQtAutoGenerators.cxx | |
parent | 71c5ae253cb5498da319e36bcf49869509b6603c (diff) | |
download | CMake-ddf940725e8af095b1c02606aeea64cc9baaf572.zip CMake-ddf940725e8af095b1c02606aeea64cc9baaf572.tar.gz CMake-ddf940725e8af095b1c02606aeea64cc9baaf572.tar.bz2 |
Autogen: Split moc include paths on info reading
Diffstat (limited to 'Source/cmQtAutoGenerators.cxx')
-rw-r--r-- | Source/cmQtAutoGenerators.cxx | 36 |
1 files changed, 17 insertions, 19 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 |