1 安装Cmake,下载GLFW 源代码
2 通过命令行(不要用带界面的工具)--https://blog.csdn.net/pythonandjava/article/details/122777144
# 切换至下载解压后的GLFW源码目录 cd glfw-3.3.6 # 创建 build 文件夹,用于存放配置和编译后的文件 mkdir build # 切换至 build 目录 cd build # 用 cmake 生成相关构建文件(请确保你的 Mac 已经安装了 CommandLineTool 和 CMake) # 如果安装 CMake 后执行下方命令后依旧出现 “zsh: command not found: cmake” ,请先执行下面这条命令后重试 # sudo "/Applications/CMake.app/Contents/bin/cmake-gui" --install cmake .. # 构建并安装GLFW make && sudo make install
3 安装完成
[100%] Built target docs Install the project... -- Install configuration: "" -- Installing: /usr/local/lib/libglfw3.a -- Installing: /usr/local/include/GLFW -- Installing: /usr/local/include/GLFW/glfw3.h -- Installing: /usr/local/include/GLFW/glfw3native.h -- Installing: /usr/local/lib/cmake/glfw3/glfw3Config.cmake -- Installing: /usr/local/lib/cmake/glfw3/glfw3ConfigVersion.cmake -- Installing: /usr/local/lib/cmake/glfw3/glfw3Targets.cmake -- Installing: /usr/local/lib/cmake/glfw3/glfw3Targets-noconfig.cmake -- Installing: /usr/local/lib/pkgconfig/glfw3.pc
标签:cmake,--,local,Installing,Mac,GLFW,usr,安装 From: https://www.cnblogs.com/8335IT/p/16921713.html