
Preparing Libraries:
CMake:
Since most of the libraries provide cmake files to generate files, it is better to have a CMake on your Mac. I do not know a lot about CMake. I just explain how to install it.
For convenience, I installed CMake by Homebrew. Here is the link for installing Homebrew:http://brew.sh
After installing Homebrew, just type “brew install cmake” command in Terminal and CMake will be installed.
GLFW:
1. Go to website and download the file: http://www.glfw.org
2. Unzip the downloaded file.
3. Open Terminal and go to the root directory of glfw, like “glfw-3.2”.
4. Type commands:
cmake .
make
sudo make install
It means GLFW is successfully installed.
GLEW:
1. Go to website and download the file:http://glew.sourceforge.net
2. Open Terminal and go to the root directory of glew, like “glfw-3.1.2”.
3. Type commands:
make
make install
make clean
You may have problem like “no permission”. Because users do not have the permission to directly modify the folder /usr/local/include and /usr/local/lib. You may use command in Terminal to get the permission if you like to install in these folders. Otherwise you can modify the Makefile so that it will generate into different folder. The commands to get the permission are
sudo chown -R $(whoami) /usr/local/include/GL
sudo chown -R $(whoami) /usr/local/lib
What’s more, you can also install glew by Homebrew.