Files
yaze/cmake/overlays/sdl2/usage
scawful a20a4832d2 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.
2025-10-15 22:50:44 -04:00

9 lines
311 B
Plaintext

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.