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:
8
cmake/overlays/sdl2/usage
Normal file
8
cmake/overlays/sdl2/usage
Normal 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.
|
||||
|
||||
Reference in New Issue
Block a user