Building on Windows
Closed this issue · 0 comments
ctreffs commented
It's currently hard to build SwiftSDL2 on Windows.
In fact on CI it is not working for now (https://github.com/ctreffs/SwiftSDL2/actions/workflows/ci-windows.yml).
The idea is to:
- install SDL2 via vcpkg
- install pkfconf via vcpkg
- setup the required environment
- let SPM handle the includes and lib linking for the build
As of Swift 5.8 everything for this should be in place.
For macOS (brew) and Linux (apt) this way works for ages.
For now it does not however for the Windows platform.
Resources:
- swiftlang/swift-package-manager#5517
- swiftlang/swift-package-manager#5527
- https://forums.swift.org/t/importing-c-libraries-on-windows/60547
- https://forums.swift.org/t/how-to-build-spm-on-windows/52600/
- https://forums.swift.org/t/include-path-of-systemlibrary-on-windows-without-pkg-config/52898
- swiftlang/swift-package-manager#4381
- swiftlang/swift#60679