Compare commits

2 Commits
0.0.1 ... main

Author SHA1 Message Date
58c0439ae1 更新 CMakeLists.txt 2025-05-28 11:06:27 +08:00
31e99152e9 添加README 2025-05-27 20:05:53 +08:00
3 changed files with 32 additions and 1 deletions

1
.gitignore vendored
View File

@ -1,4 +1,5 @@
# Clion # Clion
.idea/
cmake-build-debug/ cmake-build-debug/
cmake-build-release/ cmake-build-release/

View File

@ -45,7 +45,7 @@ set(PROJECT_NAME "${PROJECT_NAME}-console")
add_executable(${PROJECT_NAME} ${SOURCE_CODE}) add_executable(${PROJECT_NAME} ${SOURCE_CODE})
target_link_libraries(${PROJECT_NAME} target_link_libraries(${PROJECT_NAME}
${SDL3_LIBRARIES} ${SDL2_LIBRARIES}
SDL2_mixer::SDL2_mixer SDL2_mixer::SDL2_mixer
SDL2_ttf::SDL2_ttf SDL2_ttf::SDL2_ttf
SDL2_image::SDL2_image SDL2_image::SDL2_image

30
README.md Normal file
View File

@ -0,0 +1,30 @@
# Space_Shoot
## 介绍
这是一个基于SDL2 SDL2_Image SDL2_Mixer SDL2_TTF 的小项目。
整体实现了一个非常简单的飞机大战小游戏。
## 构建
项目仅可以在Window平台使用MinGW进行构建暂未做MSVC适配(可自行修改CmakeLists.txt和lib里的库来进行使用其他编译器构建)
### 1. 使用Cmake
* 生成cmake构建文件
```bash
cmake -B build -G "MinGW Makefiles"
```
* 开始构建
```bash
cmake --build build --config Release -j18
```
构建好的文件全部在`bin/`目录中
### 2. 使用Clion
直接选择打开项目到此项目目录即可clion会自动识别`CmakeLists.txt`, 之后添加`Debug``Release` 项目进行构建即可.