mirror of
https://github.com/zhenyan121/SporeBG-Conid.git
synced 2026-04-10 06:14:08 +08:00
using FetchContent to control lib
This commit is contained in:
27
cmake/SDL.cmake
Normal file
27
cmake/SDL.cmake
Normal file
@@ -0,0 +1,27 @@
|
||||
include(FetchContent)
|
||||
|
||||
# ===========================
|
||||
# SDL3
|
||||
# ===========================
|
||||
FetchContent_Declare(
|
||||
SDL3
|
||||
GIT_REPOSITORY https://github.com/libsdl-org/SDL.git
|
||||
GIT_TAG release-3.2.4
|
||||
)
|
||||
|
||||
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)
|
||||
Reference in New Issue
Block a user