diff --git a/Source/cmGlobalXCodeGenerator.cxx b/Source/cmGlobalXCodeGenerator.cxx index 1682e6a44..7e6d506e2 100644 --- a/Source/cmGlobalXCodeGenerator.cxx +++ b/Source/cmGlobalXCodeGenerator.cxx @@ -2623,10 +2623,22 @@ cmGlobalXCodeGenerator { if(config) { - - dir += prefix; - dir += config; - dir += suffix; + if(dir.find(".framework") != dir.npos) + { + std::string::size_type pos = dir.rfind("/"); + std::string framework = dir.substr(pos); + std::string newDir; + newDir = dir.substr(0, pos); + newDir += "/"; + newDir += config; + dir = newDir; + } + else + { + dir += prefix; + dir += config; + dir += suffix; + } } } }