Mac平台 CMake 安装

下载安装

CMake 官网下载 https://cmake.org/download/

安装完打开:
Tools -> How to install For Command Line Use
弹窗里提供了命令行使用CMake的配置方法

截屏2021-11-12 下午5.30.32.png

临时使用 (关闭命令行窗口会失效)

PATH="/Applications/CMake.app/Contents/bin":"$PATH"

长期使用

在bash_profile中配置CMake路径

open .bash_profile
// 在bash_profile中 添加CMake Path
export PATH="/Applications/CMake.app/Contents/bin":"$PATH"

在zshrc 中执行source .bash_profile

vim ~/.zshrc
// 添加source .bash_profile
source .bash_profile

参考文章://www.greatytc.com/p/7fff1f77dd9d

最后编辑于
©著作权归作者所有,转载或内容合作请联系作者
平台声明:文章内容(如有图片或视频亦包括在内)由作者上传并发布,文章内容仅代表作者本人观点,简书系信息发布平台,仅提供信息存储服务。

推荐阅读更多精彩内容