加入squirrel 调试器

This commit is contained in:
2025-10-23 15:21:33 +08:00
parent f9a2300b5a
commit a6cb5db26c
9 changed files with 26034 additions and 1 deletions

View File

@@ -48,7 +48,23 @@ set(SDL2TTF_BUILD_STATIC ON CACHE BOOL "Enable SDL2_ttf static library" FORCE)
set(SDL2TTF_BUILD_EXAMPLES OFF CACHE BOOL "Disable SDL2_ttf examples" FORCE)
add_subdirectory(Library/SDL_ttf)
# 遍历所有目标,过滤可执行文件和实用工具
get_cmake_property(all_targets TARGETS)
if(all_targets) # 确保目标列表不为空
foreach(target ${all_targets})
# 跳过无效目标(如 NOTFOUND
if(target STREQUAL "NOTFOUND")
continue()
endif()
# 获取目标类型
get_target_property(target_type ${target} TYPE)
# 检查类型是否有效(避免非目标的无效值)
if(target_type AND (target_type STREQUAL "EXECUTABLE" OR target_type STREQUAL "UTILITY"))
message(STATUS "Excluding target: ${target} (type: ${target_type})")
set_target_properties(${target} PROPERTIES EXCLUDE_FROM_ALL TRUE)
endif()
endforeach()
endif()
# 收集源文件
file(GLOB_RECURSE SOURCES
@@ -78,6 +94,7 @@ target_include_directories(${PROJECT_NAME} PRIVATE
Library/squirrel/include
Library/squirrel/squirrel
Library/squirrel/sqstdlib
Library/sqdbg
source
source_game
)