diff --git a/Software/Development/Environment/CMake/使用_CMake_构建项目.md b/Software/Development/Environment/CMake/使用_CMake_构建项目.md new file mode 100644 index 0000000..ed7bc88 --- /dev/null +++ b/Software/Development/Environment/CMake/使用_CMake_构建项目.md @@ -0,0 +1,19 @@ +# 使用 CMake 构建项目 + +## 1.基本使用 + +CMake 会生成各种临时文件,用下面命令可将这些临时文件集中在 build 文件夹下: + +```bash +cmake -S . -B build +``` + +## 2.常用宏 + +### 2.1.CMAKE_INSTALL_PREFIX + +通过修改该宏,重新指定 install 目录: + +```bash +cmake -DCMAKE_INSTALL_PREFIX +```