diff options
author | Bill Hoffman <bill.hoffman@kitware.com> | 2005-12-27 19:56:56 (GMT) |
---|---|---|
committer | Bill Hoffman <bill.hoffman@kitware.com> | 2005-12-27 19:56:56 (GMT) |
commit | 82bb6fae0d127b2ffcaae5eaa8a5365093cfac5c (patch) | |
tree | 6ed31cc2a14443808e4b04510bea76e22c204a13 /Source/cmGlobalXCodeGenerator.cxx | |
parent | c04cbcac70535788ca79ce7cf621f3baaf2abcbb (diff) | |
download | CMake-82bb6fae0d127b2ffcaae5eaa8a5365093cfac5c.zip CMake-82bb6fae0d127b2ffcaae5eaa8a5365093cfac5c.tar.gz CMake-82bb6fae0d127b2ffcaae5eaa8a5365093cfac5c.tar.bz2 |
ENH: add framework support to FIND_FILE
Diffstat (limited to 'Source/cmGlobalXCodeGenerator.cxx')
-rw-r--r-- | Source/cmGlobalXCodeGenerator.cxx | 40 |
1 files changed, 37 insertions, 3 deletions
diff --git a/Source/cmGlobalXCodeGenerator.cxx b/Source/cmGlobalXCodeGenerator.cxx index 43c47f8..fc37952 100644 --- a/Source/cmGlobalXCodeGenerator.cxx +++ b/Source/cmGlobalXCodeGenerator.cxx @@ -1173,11 +1173,45 @@ void cmGlobalXCodeGenerator::CreateBuildSettings(cmTarget& target, std::vector<std::string>& includes = m_CurrentMakefile->GetIncludeDirectories(); std::vector<std::string>::iterator i = includes.begin(); + std::string fdirs; + std::set<cmStdString> emitted; for(;i != includes.end(); ++i) { - std::string incpath = - this->XCodeEscapePath(i->c_str()); - dirs += incpath + " "; + if(cmSystemTools::IsPathToFramework(i->c_str())) + { + std::string frameworkDir = *i; + frameworkDir += "/../"; + frameworkDir = cmSystemTools::CollapseFullPath(frameworkDir.c_str()); + if(emitted.insert(frameworkDir).second) + { + fdirs += this->XCodeEscapePath(frameworkDir.c_str()); + fdirs += " "; + } + } + else + { + std::string incpath = + this->XCodeEscapePath(i->c_str()); + dirs += incpath + " "; + } + } + std::vector<std::string>& frameworks = target.GetFrameworks(); + if(frameworks.size()) + { + for(std::vector<std::string>::iterator i = frameworks.begin(); + i != frameworks.end(); ++i) + { + if(emitted.insert(*i).second) + { + fdirs += this->XCodeEscapePath(i->c_str()); + fdirs += " "; + } + } + } + if(fdirs.size()) + { + buildSettings->AddAttribute("FRAMEWORK_SEARCH_PATHS", + this->CreateString(fdirs.c_str())); } if(dirs.size()) { |