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
1 change: 1 addition & 0 deletions packages/webgpu/Package.swift
Original file line number Diff line number Diff line change
Expand Up @@ -128,6 +128,7 @@ if let skiaPath = nodePackage("react-native-skia"),
// cpp/rnwgpu), so every directory that's the target of one of those bare
// includes has to be listed explicitly here. The "webgpu/..." and "dawn/..."
// includes resolve through the Dawn xcframework's embedded headers.
// Keep in sync with header_dirs in react-native-webgpu.podspec.
let internalHeaderDirs = [
"apple",
"cpp",
Expand Down
8 changes: 7 additions & 1 deletion packages/webgpu/react-native-webgpu.podspec
Original file line number Diff line number Diff line change
Expand Up @@ -95,8 +95,14 @@ Pod::Spec.new do |s|
s.frameworks = "AVFoundation", "CoreMedia", "CoreVideo", "ImageIO"
end

# Under use_frameworks!, bare includes across folders (e.g. "GPU.h")
# resolve only through these paths. Keep in sync with internalHeaderDirs
# in Package.swift.
header_dirs = %w[apple cpp cpp/jsi cpp/rnwgpu cpp/rnwgpu/api cpp/rnwgpu/api/descriptors cpp/rnwgpu/async]
header_search_paths = header_dirs.map { |dir| "\"$(PODS_TARGET_SRCROOT)/#{dir}\"" }

s.pod_target_xcconfig = {
'HEADER_SEARCH_PATHS' => "$(PODS_TARGET_SRCROOT)/cpp \"#{dawn_include}\"",
'HEADER_SEARCH_PATHS' => (header_search_paths + ["\"#{dawn_include}\""]).join(' '),
# Xcode's all-target headermaps let same-named headers leak across pods
# (e.g. @shopify/react-native-skia keeps a jsi/ helper layer with
# identical relative header paths). Resolve includes strictly through our
Expand Down
Loading