Files
SporeBG-Conid/cmake/SDL.cmake
2025-12-27 20:12:08 +08:00

42 lines
917 B
CMake
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
include(FetchContent)
# ===========================
# SDL3
# ===========================
FetchContent_Declare(
SDL3
GIT_REPOSITORY https://github.com/libsdl-org/SDL.git
GIT_TAG release-3.2.28
)
FetchContent_MakeAvailable(SDL3)
# ===========================
# SDL3_ttf使用内置 FreeType + Harfbuzz
# ===========================
set(SDLTTF_VENDORED ON CACHE BOOL "" FORCE)
set(SDLTTF_HARFBUZZ OFF CACHE BOOL "" FORCE)
set(SDLTTF_PLUTOSVG OFF CACHE BOOL "" FORCE)
FetchContent_Declare(
SDL3_ttf
GIT_REPOSITORY https://github.com/libsdl-org/SDL_ttf.git
GIT_TAG release-3.2.2 # ← 正确的版本
)
FetchContent_MakeAvailable(SDL3_ttf)
# ===========================
# SDL3_image
# ===========================
FetchContent_Declare(
SDL3_image
GIT_REPOSITORY https://github.com/libsdl-org/SDL_image.git
GIT_TAG release-3.2.0
)
FetchContent_MakeAvailable(SDL3_image)