cmake_minimum_required(VERSION 3.30) project(incubatorGame) set(CMAKE_CXX_STANDARD 20) set(CMAKE_CXX_STANDARD_REQUIRED ON) # 设置所有可执行文件的默认输出目录为 cmake-build-debug/bin set(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/bin) foreach(OUTPUTCONFIG DEBUG RELEASE RELWITHDEBINFO MINSIZEREL) set(CMAKE_RUNTIME_OUTPUT_DIRECTORY_${OUTPUTCONFIG} ${CMAKE_BINARY_DIR}/bin) endforeach() # 添加依赖库目录(例如 deps 目录) add_subdirectory(deps) # 添加 src 目录 add_subdirectory(src)