Skip to content
Open
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
8 changes: 8 additions & 0 deletions packages/skia/scripts/build-skia.ts
Original file line number Diff line number Diff line change
Expand Up @@ -140,6 +140,12 @@ const buildXCFrameworks = () => {
// eslint-disable-next-line max-len
`lipo -create ${OutFolder}/${os}/x64-iphonesimulator/${name} ${OutFolder}/${os}/arm64-iphonesimulator/${name} -output ${OutFolder}/${os}/iphonesimulator/${name}`
);
$(`mkdir -p ${OutFolder}/${os}/maccatalyst`);
$(`rm -rf ${OutFolder}/${os}/maccatalyst/${name}`);
$(
// eslint-disable-next-line max-len
`lipo -create ${OutFolder}/${os}/x64-maccatalyst/${name} ${OutFolder}/${os}/arm64-maccatalyst/${name} -output ${OutFolder}/${os}/maccatalyst/${name}`
);
$(`mkdir -p ${OutFolder}/${os}/macosx`);
$(`rm -rf ${OutFolder}/${os}/macosx/${name}`);
$(
Expand All @@ -155,13 +161,15 @@ const buildXCFrameworks = () => {
`-library ${prefix}/arm64-iphoneos/${name} ` +
`-library ${prefix}/iphonesimulator/${name} ` +
`-library ${prefix}/macosx/${name} ` +
`-library ${prefix}/maccatalyst/${name} ` +
` -output ${dstPath}`
: "xcodebuild -create-xcframework " +
`-library ${prefix}/arm64-iphoneos/${name} ` +
`-library ${prefix}/iphonesimulator/${name} ` +
`-library ${prefix}/arm64-tvos/${name} ` +
`-library ${prefix}/tvsimulator/${name} ` +
`-library ${prefix}/macosx/${name} ` +
`-library ${prefix}/maccatalyst/${name} ` +
` -output ${dstPath}`;

$(xcframeworkCmd);
Expand Down
49 changes: 49 additions & 0 deletions packages/skia/scripts/skia-configuration.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
import path from "path";

import { $ } from "./utils";
import { spawnSync } from "child_process";

const DEBUG = false;
export const GRAPHITE = !!process.env.SK_GRAPHITE;
Expand Down Expand Up @@ -228,6 +229,54 @@ export const configurations = {
args: [["ios_min_target", `"${appleSimulatorMinTarget}"`]],
},
...tvosTargets,
"arm64-maccatalyst": {
cpu: "arm64",
platform: "mac",
args: [
["skia_enable_gpu", true],
["target_os", `"mac"`],
["target_cpu", `"arm64"`],
["mac_deployment_target", `"14.0"`],
[
"extra_cflags",
`["-target","arm64-apple-ios14.0-macabi",` +
`"-isysroot","${appleSdkRoot}",` +
`"-isystem","${appleSdkRoot}/System/iOSSupport/usr/include",` +
`"-iframework","${appleSdkRoot}/System/iOSSupport/System/Library/Frameworks"]`,
],
[
"extra_ldflags",
`["-isysroot","${appleSdkRoot}",` +
`"-iframework","${appleSdkRoot}/System/iOSSupport/System/Library/Frameworks"]`,
],
["cc", "\"clang\""],
["cxx", "\"clang++\""],
],
},
"x64-maccatalyst": {
cpu: "x64",
platform: "mac",
args: [
["skia_enable_gpu", true],
["target_os", `"mac"`],
["target_cpu", `"x64"`],
["mac_deployment_target", `"14.0"`],
[
"extra_cflags",
`["-target","x86_64-apple-ios14.0-macabi",` +
`"-isysroot","${appleSdkRoot}",` +
`"-isystem","${appleSdkRoot}/System/iOSSupport/usr/include",` +
`"-iframework","${appleSdkRoot}/System/iOSSupport/System/Library/Frameworks"]`,
],
[
"extra_ldflags",
`["-isysroot","${appleSdkRoot}",` +
`"-iframework","${appleSdkRoot}/System/iOSSupport/System/Library/Frameworks"]`,
],
["cc", "\"clang\""],
["cxx", "\"clang++\""],
],
},
"arm64-macosx": {
platformGroup: "macosx",
cpu: "arm64",
Expand Down