@@ -70,18 +70,6 @@ export const APPLE_ARCHITECTURES = {
7070 "arm64-apple-visionos-sim" : "arm64" ,
7171} satisfies Record < AppleTriplet , AppleArchitecture > ;
7272
73- export function getAppleSDKPath ( triplet : AppleTriplet ) {
74- return cp
75- . spawnSync (
76- "xcrun" ,
77- [ "--sdk" , XCODE_SDK_NAMES [ triplet ] , "--show-sdk-path" ] ,
78- {
79- encoding : "utf-8" ,
80- }
81- )
82- . stdout . trim ( ) ;
83- }
84-
8573export function createPlistContent ( values : Record < string , string > ) {
8674 return [
8775 '<?xml version="1.0" encoding="UTF-8"?>' ,
@@ -103,7 +91,6 @@ type AppleConfigureOptions = {
10391
10492export function getAppleConfigureCmakeArgs ( { triplet } : AppleConfigureOptions ) {
10593 assert ( isAppleTriplet ( triplet ) ) ;
106- const sdkPath = getAppleSDKPath ( triplet ) ;
10794 const systemName = CMAKE_SYSTEM_NAMES [ triplet ] ;
10895
10996 return [
@@ -114,7 +101,7 @@ export function getAppleConfigureCmakeArgs({ triplet }: AppleConfigureOptions) {
114101 `CMAKE_SYSTEM_NAME=${ systemName } ` ,
115102 // Set the SDK path for the target platform
116103 "-D" ,
117- `CMAKE_OSX_SYSROOT=${ sdkPath } ` ,
104+ `CMAKE_OSX_SYSROOT=${ XCODE_SDK_NAMES [ triplet ] } ` ,
118105 // Set the target architecture
119106 "-D" ,
120107 `CMAKE_OSX_ARCHITECTURES=${ APPLE_ARCHITECTURES [ triplet ] } ` ,
0 commit comments