-
Notifications
You must be signed in to change notification settings - Fork 2.1k
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
SDL3, macOS: Installation is not Mac-like #12009
Comments
I'm not sure what to do with the share folder either. @madebr, can you update INSTALL.md with the correct installation procedure? Using the xcframework is just a matter of dragging it into your project. Maybe the share folder isn't needed in this case? |
The share folder in Also, dragging the xcframework into your project only works if you have an Xcode project, which you won't have if you're using a language or build system not supported by Xcode |
The folder contains files that seem to be required for CMake. To make CMake find SDL3, I have to copy the folder into the same location as SDL3.xcframework. |
It is important to mention that SDL2 does not require that folder. CMake detects SDL2 without any problems. Therefore installation of SDL2 is much more straightforward. |
The CMake does not search into xcframework folders. I created an issue about this on CMake's tracker, but it looks like it has low priority. (Reply or upvote the issue to give it extra visibility) |
Last question before closing this: What is the benefit from distributing SDL3 as an xcframework? Is this only relevant for developers or also for users? |
The xcframework has libraries for all supported Apple platforms (tvOS, iOS, macOS) bundled within the single xcframework. The build system pulls the relevant one during the build process. It's a more modern way to do things on Apple platforms than having a single .framework bundle or separate loose frameworks. |
@slouken --- a/Xcode/SDL/pkg-support/resources/INSTALL.md
+++ b/Xcode/SDL/pkg-support/resources/INSTALL.md
@@ -3,7 +3,9 @@
This package contains SDL built for Xcode, and includes support for macOS, iOS and tvOS.
-To use this package, drag SDL3.xcframework into your project.
+To use this package in Xcode, drag `SDL3.xcframework` into your project.
+
+To use this package in a CMake project, copy both `SDL3.xcframework` and `share` somewhere. Add the path of the parent folder to `-DCMAKE_PREFIX_PATH=` during configuration.
# Documentation
|
Yes, that would be fine. Did you test and verify that works? |
I copy it to ~/Library/Frameworks or /Library/Frameworks. Then I don‘t have to set CMAKE_PREFIX_PATH. |
It's tested in |
Isn't |
See #12010 |
I meant to manually recursively copy the I wouldn't bother with |
There was the same problem before when using the xcframework: #11394. That problem was fixed. Maybe that fix was not done on all relevant files? |
The file was not modified after the change done in #11394 (=removing |
I think I found the problem. It seems that it was forgotten to apply this patch c56a3f6 also to the file that is stored inside the framework bundle. It was only applied to the file that is stored inside the "share" folder. The appended patch fixes the problem. |
Good catch! patch added, thanks! |
I think with @andreasgrabher's fix and @madebr's documentation we're all set here, right? |
Yes, problems are gone. Thank you! |
Great, thanks for the feedback! |
With SDL2 installation of SDL from the provided .dmg was as simple as copying SDL2.framework to ~/Library/Frameworks or /Library/Frameworks. Now there is SDL3.xcframework and a folder called "share". I think non-experienced users won't know what to do with that folder. It is also not mentioned in the included INSTALL.md.
I'd like to suggest to include that "share" folder into the framework package if possible. If not, there should be a short instruction on how to properly install the framework.
The text was updated successfully, but these errors were encountered: