Build SDL3 in-tree for Xcode - #8
Merged
Merged
Conversation
The Xcode projects linked a downloaded SDL3.xcframework, but MVC and Quetoo resolved <SDL3/...> to Homebrew's headers, because $(HOMEBREW_PREFIX)/include precedes the framework search path. With the query API, SDL_GPUDepthStencilTargetInfo differs between the two, so ObjectivelyGPU wrote past a struct that callers had sized from the stock header. ObjectivelyGPU.xcworkspace now builds SDL3.framework from SDL's own Xcode/SDL/SDL.xcodeproj, in a sibling checkout of the jdolan/SDL ObjectivelyGPU tag named SDL3, and the header search paths name its include directory. Headers and library come from one source tree. fetch-sdl3.sh is removed. Windows keeps the published VC zip, which ships matching headers and DLLs. See jdolan/quetoo#1093. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
This was referenced Sep 30, 2026
Contributor
There was a problem hiding this comment.
Copilot review overview
🟢 Approval recommended
The workspace, build settings, release workflow, and documentation consistently use the same SDL3 source checkout.
Review effort: Balanced
Findings: None
What changed in this PR
Builds the pinned SDL3 fork directly within the Xcode workspace, preventing mismatched headers and binaries.
Changes:
- Adds SDL3’s Xcode project and links its built framework.
- Updates release CI to check out SDL3 source.
- Removes the obsolete xcframework fetch script and updates documentation.
| File | Description |
|---|---|
ObjectivelyGPU.xcworkspace/contents.xcworkspacedata |
Adds the SDL3 project. |
ObjectivelyGPU.xcodeproj/project.pbxproj |
Links the built SDL3 framework and headers. |
Frameworks/fetch-sdl3.sh |
Removes binary fetching. |
Documentation/install.md |
Documents the sibling SDL3 checkout. |
.github/workflows/release.yml |
Checks out SDL3 for release builds. |
Files not reviewed (1)
- ObjectivelyGPU.xcworkspace/contents.xcworkspacedata: Generated file
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Builds SDL3 in-tree for the Xcode workspace, from SDL's own
Xcode/SDL/SDL.xcodeprojin a sibling checkout namedSDL3(the jdolan/SDLObjectivelyGPUtag).fetch-sdl3.shis removed. See jdolan/quetoo#1093.Why: ObjectivelyMVC and Quetoo put
$(HOMEBREW_PREFIX)/includebefore the framework search path, so<SDL3/...>resolved to Homebrew's stock headers while the downloaded xcframework was the fork. The fork growsSDL_GPUDepthStencilTargetInfo, so ObjectivelyGPU'sdepthTargetInfowrote past a struct that callers had sized from the stock header. With one SDL source tree, the headers and the library always agree.ObjectivelyGPU.xcworkspaceadds../SDL3/Xcode/SDL/SDL.xcodeproj. The targets linkSDL3.frameworkfrom the build products, and Xcode builds SDL3 as an implicit dependency.$(SRCROOT)/../SDL3/include.release.ymlchecks out jdolan/SDL at the tag asSDL3, in place of the fetch step.Verification: local Xcode builds only, because CI does not build the Xcode projects. The
ObjectivelyGPUscheme builds for macOS, and its objects includeSDL3/include/SDL3/SDL_gpu.h. The SDL3 target builds for iOS. The full iOS build stops in Objectively without curl headers, which the release job provides.Local setup:
git clone --branch ObjectivelyGPU https://github.com/jdolan/SDL.git ../SDL3.🤖 Generated with Claude Code