Skip to content

Commit 63dbd46

Browse files
committed
use Accelerate if UNITY_IOS
1 parent 33da0eb commit 63dbd46

File tree

1 file changed

+8
-2
lines changed

1 file changed

+8
-2
lines changed

Editor/LLMBuildProcessor.cs

+8-2
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,10 @@
11
using UnityEditor;
22
using UnityEditor.Build;
33
using UnityEditor.Build.Reporting;
4-
using UnityEditor.iOS.Xcode;
54
using UnityEngine;
5+
#if UNITY_IOS
6+
using UnityEditor.iOS.Xcode;
7+
#endif
68

79
namespace LLMUnity
810
{
@@ -44,6 +46,7 @@ private void OnBuildError(string condition, string stacktrace, LogType type)
4446
if (type == LogType.Error) BuildCompleted();
4547
}
4648

49+
#if UNITY_IOS
4750
/// <summary>
4851
/// Adds the Accelerate framework (for ios)
4952
/// </summary>
@@ -56,11 +59,14 @@ public static void AddAccelerate(string outputPath)
5659
proj.AddFrameworkToProject(proj.GetUnityFrameworkTargetGuid(), "Accelerate.framework", false);
5760
proj.WriteToFile(projPath);
5861
}
62+
#endif
5963

6064
// called after the build
6165
public void OnPostprocessBuild(BuildReport report)
6266
{
63-
if (report.summary.platform == BuildTarget.iOS) AddAccelerate(report.summary.outputPath);
67+
#if UNITY_IOS
68+
AddAccelerate(report.summary.outputPath);
69+
#endif
6470
BuildCompleted();
6571
}
6672

0 commit comments

Comments
 (0)