소스 검색

Xcode: Fix framework search paths in STATIC library targets (#14191)

In commit 2bc22bda (Xcode: Add frameworks search paths from link
dependeny closure, 2012-12-07) we made framework search paths from the
link closure conditional on target type, skipping it on STATIC and
OBJECT library targets that do not actually link.  However, the
framework search paths also influence the compile lines (-F options) so
we need them for all target types.  The Makefile generator already does
this, as did the Xcode generator prior to the above-mentioned commit.
Brad King 12 년 전
부모
커밋
21a0beacc1
1개의 변경된 파일7개의 추가작업 그리고 11개의 파일을 삭제
  1. 7 11
      Source/cmGlobalXCodeGenerator.cxx

+ 7 - 11
Source/cmGlobalXCodeGenerator.cxx

@@ -1997,20 +1997,16 @@ void cmGlobalXCodeGenerator::CreateBuildSettings(cmTarget& target,
       dirs.Add(incpath.c_str());
       }
     }
-  if(target.GetType() != cmTarget::OBJECT_LIBRARY &&
-     target.GetType() != cmTarget::STATIC_LIBRARY)
+  // Add framework search paths needed for linking.
+  if(cmComputeLinkInformation* cli = target.GetLinkInformation(configName))
     {
-    // Add framework search paths needed for linking.
-    if(cmComputeLinkInformation* cli = target.GetLinkInformation(configName))
+    std::vector<std::string> const& fwDirs = cli->GetFrameworkPaths();
+    for(std::vector<std::string>::const_iterator fdi = fwDirs.begin();
+        fdi != fwDirs.end(); ++fdi)
       {
-      std::vector<std::string> const& fwDirs = cli->GetFrameworkPaths();
-      for(std::vector<std::string>::const_iterator fdi = fwDirs.begin();
-          fdi != fwDirs.end(); ++fdi)
+      if(emitted.insert(*fdi).second)
         {
-        if(emitted.insert(*fdi).second)
-          {
-          fdirs.Add(this->XCodeEscapePath(fdi->c_str()).c_str());
-          }
+        fdirs.Add(this->XCodeEscapePath(fdi->c_str()).c_str());
         }
       }
     }