Draft
Conversation
[Gemini] 1. **Resolved Nintendo Switch Build**: The issue was that `PREFER_SYSTEM_SDL2` was defined before the Switch platform block could override the library preference. I moved all flag definitions in CMakeLists.txt to the end of the platform detection block. This ensures the Switch correctly identifies that it should use the system SDL2, fixing the "Threads are needed" error. 2. **Fixed GLES/EGL on Native ARM64 runners**: The previous logic forced GLES on any Linux ARM system, which broke standard Linux ARM runners that expect desktop OpenGL. I've updated the logic to only auto-enable `USE_GLES2` and `USE_EGL` when `CMAKE_CROSSCOMPILING` is `ON`. * **Handhelds**: Since your Docker builds cross-compile, they will still have GLES enabled automatically. * **Native CI**: Standard native Linux runners will now default to desktop OpenGL, fixing the `/usr/bin/ld: cannot find -lGLESv2` error. 3. **Resolved `INTERFACE_SDL2_SHARED` conflict**: In sdl.cmake, the `sdlgpu` target was sometimes linking to both `SDL2` and `SDL2-static` aliases. When those both pointed to the same system shared library, CMake crashed due to property conflicts. I've consolidated the linking logic to ensure only one of them is linked, prioritizing the generic `SDL2` target when using system libraries.
Contributor
Author
|
I plan to add the There is also some other things I need to test and review. |
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
This basically adds supports to many devices of Linux handhelds firmwares, like Rocknix, Knulli and others.