Sfoglia il codice sorgente

Merge branch 'backport-xcode-framework-quoting' into xcode-framework-quoting

Brad King 4 anni fa
parent
commit
b6cc9be009

+ 1 - 1
Source/cmGlobalXCodeGenerator.cxx

@@ -3696,7 +3696,7 @@ void cmGlobalXCodeGenerator::AddDependAndLinkInformation(cmXCodeObject* target)
               // implicit search path, so we need it
               libPaths.Add("-F " + this->XCodeEscapePath(fwDir));
             }
-            libPaths.Add("-framework " + fwName);
+            libPaths.Add("-framework " + this->XCodeEscapePath(fwName));
           } else {
             libPaths.Add(this->XCodeEscapePath(cleanPath));
           }

+ 10 - 0
Tests/Framework/CMakeLists.txt

@@ -83,6 +83,16 @@ if(NOT XCODE OR NOT XCODE_VERSION VERSION_LESS 5)
   target_link_libraries(barStatic fooStatic)
 endif()
 
+if(XCODE)
+  add_library(space SHARED space.c)
+  set_target_properties(space PROPERTIES
+    FRAMEWORK TRUE
+    OUTPUT_NAME "space space"
+    )
+  add_executable(use_space use_space.c)
+  target_link_libraries(use_space PRIVATE space)
+endif()
+
 include(CPack)
 
 if(APPLE)

+ 7 - 0
Tests/Framework/space.c

@@ -0,0 +1,7 @@
+#ifdef _WIN32
+__declspec(dllexport)
+#endif
+  int space(void)
+{
+  return 0;
+}

+ 8 - 0
Tests/Framework/use_space.c

@@ -0,0 +1,8 @@
+#ifdef _WIN32
+__declspec(dllimport)
+#endif
+  int space(void);
+int main(void)
+{
+  return space();
+}