Skip to content

Added Swift package support (PR 3/3) - #16535

Open
jasonbobier wants to merge 72 commits into
libsdl-org:mainfrom
jasonbobier:swift-package
Open

jasonbobier wants to merge 72 commits into
libsdl-org:mainfrom
jasonbobier:swift-package

Conversation

@jasonbobier

@jasonbobier jasonbobier commented Oct 16, 2026 •

Copy link
Copy Markdown
Contributor
  • I confirm that I am the author of this code and release it to the SDL project under the zlib license. This contribution does not contain code from other sources, including code generated by a Large Language Model ("AI").

Description

This PR along with its two previous (#16300 and #16534) add experimental swift package support to SDL. A goal was to be as full featured as the CMake build and Xcode build combined. The previous PRs contained the non-swiftpm changes that would be beneficial to all builds. This one contains the swift pm changes and makes as few changes to the existing repo as possible.

All tests and examples build and run on macOS (though a few don't really do anything because the mac doesn't have the features). It is possible to get them running on the other OSes as well, but requires some hacking in order to produce app bundles.

Documentation on using it has been added in the usual places under the usual names, but a swift run testsprite will build the project with default drivers and run the testsprite exe for a quick look. :)

NOTE: This PR is stacked on the previous two.

* Initial macOS support working.
Fixed test warnings.
Added SteamStorage trait.
Renamed SDL3_test.
Added macOS audio, camera, and dialog subsystems.
Moved the build_config override.
Fixed a couple fo comments.
@jasonbobier

Copy link
Copy Markdown
Contributor Author

Looks like my swifty naming of the module doesn't work with the current Xcode builds. Rather than fighting with it, I'll just rename the module (at least for now). Fix upcoming.

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.

1 participant