chore(cmake): add vcpkg overlay support for SDL2

- Introduced custom vcpkg port overlays to address SDL2 installation issues on Windows by skipping pkgconfig fixup.
- Updated CI and release workflows to include the new `VCPKG_OVERLAY_PORTS` configuration for enhanced build reliability.
- Added documentation for the overlays, detailing their purpose and usage.

Benefits:
- Prevents build failures related to SDL2 on Windows, improving the overall stability of the build process.
- Streamlines the integration of patched ports without forking the vcpkg repository, enhancing maintainability.
This commit is contained in:
scawful
2025-10-15 22:50:44 -04:00
parent 5acda67016
commit a20a4832d2
6 changed files with 198 additions and 0 deletions

View File

@@ -0,0 +1,8 @@
SDL2 provides CMake targets:
find_package(SDL2 CONFIG REQUIRED)
target_link_libraries(main PRIVATE $<IF:$<TARGET_EXISTS:SDL2::SDL2>,SDL2::SDL2,SDL2::SDL2-static>)
# SDL2::SDL2main may be optionally added manually to provide a main() function wrapper.
# If you use this, don't use SDL_MAIN_HANDLED.