Skip to content

Build SDL3 in-tree for Xcode - #8

Merged
jdolan merged 1 commit into
mainfrom
sdl-in-tree
Sep 30, 2026
Merged

jdolan merged 1 commit into
mainfrom
sdl-in-tree

Conversation

@jdolan

@jdolan jdolan commented Sep 30, 2026

Copy link
Copy Markdown
Owner

Builds SDL3 in-tree for the Xcode workspace, from SDL's own Xcode/SDL/SDL.xcodeproj in a sibling checkout named SDL3 (the jdolan/SDL ObjectivelyGPU tag). fetch-sdl3.sh is removed. See jdolan/quetoo#1093.

Why: ObjectivelyMVC and Quetoo put $(HOMEBREW_PREFIX)/include before the framework search path, so <SDL3/...> resolved to Homebrew's stock headers while the downloaded xcframework was the fork. The fork grows SDL_GPUDepthStencilTargetInfo, so ObjectivelyGPU's depthTargetInfo wrote past a struct that callers had sized from the stock header. With one SDL source tree, the headers and the library always agree.

  • ObjectivelyGPU.xcworkspace adds ../SDL3/Xcode/SDL/SDL.xcodeproj. The targets link SDL3.framework from the build products, and Xcode builds SDL3 as an implicit dependency.
  • The header search paths name $(SRCROOT)/../SDL3/include.
  • release.yml checks out jdolan/SDL at the tag as SDL3, in place of the fetch step.
  • Windows keeps the published VC zip, which ships matching headers and DLLs.

Verification: local Xcode builds only, because CI does not build the Xcode projects. The ObjectivelyGPU scheme builds for macOS, and its objects include SDL3/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

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>

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

@jdolan
jdolan merged commit e8f373d into main Sep 30, 2026
4 checks passed
@jdolan
jdolan deleted the sdl-in-tree branch September 30, 2026 18:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants