-
Notifications
You must be signed in to change notification settings - Fork 480
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
Add new use_ios_framework for linking to SDL2.framework on iOS #1407
Conversation
Looks good to me, have you tested it yourself to see that it worked on iOS? |
I'm currently toying around with bring-up of my project on iOS. It does build but I'm still running through the steps of standing up an Xcode project to bundle the executable into an app. Building my project with |
Alright, please ring me up when you manage to make it work. We never know, there might be specific flags for framework that are needed in rust-sdl2, I'd prefer if we did that in one PR only. |
Would you mind adding that part to the readme? I'm sure it will help some people. |
And the changelog as well. |
Just pushed an updated readme and changelog. Let me know if the changelog format is good. |
Nice job! |
Currently the crate has a 'use_mac_framework' for linking to SDL2 using the .framework instead of linking directly to the static/dynamic libraries. This PR adds a new feature flag for doing the same, but for iOS.
AFAIK there are no official iOS builds for SDL2, but you can quite easily build your own SDL2.framework using the Xcode project. I'd like to be able to link iOS builds of my project using SDL2.framework but there's currently no way to either skip linking SDL2 inside the existing build script (and do it in my own build script) or to instruct the existing build script to link to a framework on iOS.
This PR remedies this by just making a duplicate of 'use_mac_framework' called 'use_ios_framework' which behaves much the same way, changing link type to 'framework' on iOS when the feature is enabled.
What do you think?