使用静态链接SDL,同时优化CMake配置项

This commit is contained in:
2026-01-18 23:27:18 +08:00
parent e4fc3f2bd8
commit 08aff2e960
2 changed files with 5 additions and 3 deletions

View File

@@ -13,9 +13,11 @@ setup_project_options(
STANDARD 23
INTERFACE_TARGET mirai_project_options
)
configure_project_defaults()
set(SPDLOG_FMT_EXTERNAL OFF)
set(SPDLOG_FMT_EXTERNAL_HO ON)
set(SDL_STATIC ON CACHE BOOL "Build SDL as a static library")
set(SPDLOG_FMT_EXTERNAL OFF CACHE BOOL "Use external fmt library in spdlog")
set(SPDLOG_FMT_EXTERNAL_HO ON CACHE BOOL "Use header-only external fmt library in spdlog")
add_subdirectory(third_party/vma_hpp/include)
add_subdirectory(third_party/vma_hpp/VulkanMemoryAllocator)

View File

@@ -6,7 +6,7 @@ simple_library(STATIC)
target_link_libraries(${PROJECT_NAME} PUBLIC
Vulkan::Vulkan
SDL3::SDL3
SDL3::SDL3-static
freetype
harfbuzz
yogacore