Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/mono/msbuild/apple/build/AppleApp.targets
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@

<!-- common linker arguments for app and library builds -->
<ItemGroup>
<_CommonLinkerArgs Condition="'$(TargetOS)' != 'tvos'" Include="-framework GSS" />
Comment thread
steveisok marked this conversation as resolved.
<_CommonLinkerArgs Condition="'$(_IsLibraryMode)' == 'true' and '$(TargetOS)' != 'tvos' and '$(TargetOS)' != 'tvossimulator'" Include="-framework GSS" />
</ItemGroup>

<PropertyGroup>
Expand Down
8 changes: 8 additions & 0 deletions src/tasks/AppleAppBuilder/Xcode.cs
Original file line number Diff line number Diff line change
Expand Up @@ -400,12 +400,20 @@ public string GenerateCMake(
toLink += $" {asmLinkFile}{Environment.NewLine}";
}

string frameworks = "";
if ((Target == TargetNames.iOS) || (Target == TargetNames.iOSsim) || (Target == TargetNames.MacCatalyst))
{
frameworks = "\"-framework GSS\"";
}

string appLinkerArgs = "";
foreach(string linkerArg in extraLinkerArgs)
{
appLinkerArgs += $" \"{linkerArg}\"{Environment.NewLine}";
}

appLinkerArgs += $" {frameworks}{Environment.NewLine}";

cmakeLists = cmakeLists.Replace("%NativeLibrariesToLink%", toLink);
cmakeLists = cmakeLists.Replace("%APP_LINKER_ARGS%", appLinkerArgs);
cmakeLists = cmakeLists.Replace("%AotSources%", aotSources);
Expand Down