Files
SDL3Test/CMakeLists.txt
2025-06-10 18:24:07 +08:00

37 lines
900 B
CMake

#
# project: mirage
#
cmake_minimum_required(VERSION 3.21)
project(mirage)
include(cmake/project_cpp_standard.cmake)
set_cpp_standard(23)
set(BUILD_SHARED_LIBS OFF)
include(cmake/retrieve_files.cmake)
include(cmake/detect_os.cmake)
include(cmake/config_macos.cmake)
include(cmake/compile_shaders.cmake)
include(cmake/mingw_dll.cmake)
include(cmake/mirage_utils.cmake)
# 配置输出目录
configure_project_defaults()
# 如果是Debug模式, 添加宏定义
if (CMAKE_BUILD_TYPE STREQUAL "Debug")
add_definitions(-DDEBUG=1)
else ()
add_definitions(-DDEBUG=0)
endif ()
add_subdirectory(third_party/SDL)
add_subdirectory(third_party/SDL_ttf)
SET(SRC_FILES)
retrieve_files(${CMAKE_CURRENT_SOURCE_DIR}/src SRC_FILES)
add_executable(learn ${SRC_FILES})
target_include_directories(learn PRIVATE ${CMAKE_CURRENT_SOURCE_DIR}/src)
target_link_libraries(learn SDL3-static SDL3_ttf-static d3d12)