Include IOKit.framework based on the source code
This includes IOKit.framework based on the source code
that uses IOKit.
It fixes the compilation error on tvOS.
Bug: 391990604
Change-Id: Ic6c8982b726f8dec8c214c47bf43e559effd311f
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/237214
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Commit-Queue: Corentin Wallez <cwallez@chromium.org>
Reviewed-by: dan sinclair <dsinclair@chromium.org>
diff --git a/src/dawn/native/BUILD.gn b/src/dawn/native/BUILD.gn
index 7bd5354..e525cea 100644
--- a/src/dawn/native/BUILD.gn
+++ b/src/dawn/native/BUILD.gn
@@ -643,13 +643,15 @@
if (dawn_enable_metal) {
frameworks = [
- "IOKit.framework",
"IOSurface.framework",
"Metal.framework",
"QuartzCore.framework",
]
if (is_mac) {
- frameworks += [ "Cocoa.framework" ]
+ frameworks += [
+ "Cocoa.framework",
+ "IOKit.framework",
+ ]
}
sources += [
"Surface_metal.mm",
diff --git a/src/dawn/native/CMakeLists.txt b/src/dawn/native/CMakeLists.txt
index fd483fe..06d7845 100644
--- a/src/dawn/native/CMakeLists.txt
+++ b/src/dawn/native/CMakeLists.txt
@@ -539,11 +539,13 @@
"Surface_metal.mm"
)
if (DAWN_TARGET_MACOS)
- list(APPEND conditional_private_platform_depends "-framework Cocoa")
+ list(APPEND conditional_private_platform_depends
+ "-framework Cocoa"
+ "-framework IOKit"
+ )
endif()
list(APPEND conditional_private_platform_depends
"-framework Foundation"
- "-framework IOKit"
"-framework IOSurface"
"-framework QuartzCore"
"-framework Metal"