mirror of
https://github.com/Kitware/CMake.git
synced 2026-03-09 01:09:30 -05:00
Xcode: Restore support for spaces in framework names
In commit ce2dee9e5b (Xcode: Don't add framework as -framework argument
in linker info list, 2020-09-28, v3.19.0-rc1~47^2) we split up the path
to a framework into the directory and framework name parts, but only
retained the quoting on the directory part. Restore quoting of the
framework name.
Fixes: #21910
This commit is contained in:
@@ -3647,7 +3647,7 @@ void cmGlobalXCodeGenerator::AddDependAndLinkInformation(cmXCodeObject* target)
|
|||||||
// implicit search path, so we need it
|
// implicit search path, so we need it
|
||||||
libPaths.Add("-F " + this->XCodeEscapePath(fwDir));
|
libPaths.Add("-F " + this->XCodeEscapePath(fwDir));
|
||||||
}
|
}
|
||||||
libPaths.Add("-framework " + fwName);
|
libPaths.Add("-framework " + this->XCodeEscapePath(fwName));
|
||||||
} else {
|
} else {
|
||||||
libPaths.Add(this->XCodeEscapePath(cleanPath));
|
libPaths.Add(this->XCodeEscapePath(cleanPath));
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -83,6 +83,16 @@ if(NOT XCODE OR NOT XCODE_VERSION VERSION_LESS 5)
|
|||||||
target_link_libraries(barStatic fooStatic)
|
target_link_libraries(barStatic fooStatic)
|
||||||
endif()
|
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)
|
include(CPack)
|
||||||
|
|
||||||
if(APPLE)
|
if(APPLE)
|
||||||
|
|||||||
7
Tests/Framework/space.c
Normal file
7
Tests/Framework/space.c
Normal file
@@ -0,0 +1,7 @@
|
|||||||
|
#ifdef _WIN32
|
||||||
|
__declspec(dllexport)
|
||||||
|
#endif
|
||||||
|
int space(void)
|
||||||
|
{
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
8
Tests/Framework/use_space.c
Normal file
8
Tests/Framework/use_space.c
Normal file
@@ -0,0 +1,8 @@
|
|||||||
|
#ifdef _WIN32
|
||||||
|
__declspec(dllimport)
|
||||||
|
#endif
|
||||||
|
int space(void);
|
||||||
|
int main(void)
|
||||||
|
{
|
||||||
|
return space();
|
||||||
|
}
|
||||||
Reference in New Issue
Block a user