-
Notifications
You must be signed in to change notification settings - Fork 40
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Build via Swift package manager #384
Open
ephemer
wants to merge
16
commits into
master
Choose a base branch
from
SwiftPM
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from 9 commits
Commits
Show all changes
16 commits
Select commit
Hold shift + click to select a range
99211fb
SwiftPM
ephemer c4a499d
Use `@_implementationOnly` to avoid leaking SDL implementation detail…
ephemer e908c0f
Allow static build
ephemer 984d0b1
Add UIKit_C_API
ephemer 35a9d0e
Working towards mac build again
ephemer a948114
Don't export SDL symbols unnecessarily
ephemer 33aabd5
Merge branch 'master' into SwiftPM
ephemer a91aa47
Update submodules
ephemer 6141a54
Match potentiallyFixNativeTouchCrash implementation of handleSDLEvent…
ephemer eb6812e
Merge branch 'master' into SwiftPM
ephemer 30f89e9
Revert log2 -> log
ephemer 563c8f0
Remove reference to deleted DispatchQueue+syncSafe
ephemer fe2eeaf
Working Mac SwiftPM build
ephemer 94a6d07
Update SDL to fix Android build
ephemer 0d89cc2
Update SDL
ephemer de503db
Update SDL
ephemer File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
// swift-tools-version:5.7 | ||
import PackageDescription | ||
|
||
let package = Package( | ||
name: "UIKit", | ||
platforms: [.macOS(.v10_15)], | ||
products: [ | ||
.library(name: "UIKit", targets: ["UIKit"]) | ||
], | ||
dependencies: [ | ||
.package(path: "./swift-jni"), | ||
.package(path: "./SDL"), | ||
], | ||
targets: [ | ||
.target( | ||
name: "UIKit", | ||
dependencies: [ | ||
.product(name: "SDL_macOS", package: "SDL", condition: .when(platforms: [.macOS])), | ||
.product(name: "SDL_Android", package: "SDL", condition: .when(platforms: [.android])), | ||
.product(name: "JNI", package: "swift-jni", condition: .when(platforms: [.android])), | ||
.target(name: "UIKit_C_API", condition: .when(platforms: [.android])), | ||
], | ||
path: "Sources", | ||
exclude: ["Mac-Info.plist"] | ||
), | ||
.target(name: "UIKit_C_API", path: "UIKit_C_API"), | ||
] | ||
) |
Submodule SDL
updated
26 files
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
import SDL | ||
@_implementationOnly import SDL | ||
|
||
@MainActor | ||
open class CALayer { | ||
|
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
#if os(WASI) | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. nit: WASI shouldn't be needed for UIKit, right? |
||
@_exported import func WASILibc.pow | ||
@_exported import func WASILibc.log10 | ||
@_exported import func WASILibc.log2 | ||
@_exported import func WASILibc.sin | ||
@_exported import func WASILibc.cos | ||
#elseif canImport(Glibc) | ||
@_exported import func Glibc.pow | ||
@_exported import func Glibc.log10 | ||
@_exported import func Glibc.log2 | ||
@_exported import func Glibc.sin | ||
@_exported import func Glibc.cos | ||
@_exported import var Glibc.CLOCK_REALTIME | ||
@_exported import func Glibc.clock_gettime | ||
@_exported import struct Glibc.timespec | ||
@_exported import struct Glibc.clockid_t | ||
#elseif canImport(Darwin) | ||
@_exported import func Foundation.pow | ||
@_exported import func Foundation.log10 | ||
@_exported import func Foundation.log2 | ||
@_exported import func Foundation.sin | ||
@_exported import func Foundation.cos | ||
@_exported import func Foundation.clock_gettime | ||
@_exported import struct Foundation.timespec | ||
#endif |
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
Oops, something went wrong.
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I found some docs about this here but can you explain in our context what this actually changes?