Chronology
-
brew install cmake
-
Download GLFW https://www.glfw.org/download.html
-
Download glad https://glad.dav1d.de/
-
Run Cmake, create GLFW build folder https://stackoverflow.com/questions/7751342/how-to-execute-make-file Specify generator for this project: Unix makefile cd build/ make cd build/src make
-
Copy glfw-3.3.8/build/src/libglfw3.a to project/Libraries/lib https://stackoverflow.com/questions/5965171/what-is-a-file-with-extension-a
-
Copy glfw-3.3.8/include/GLFW to /Libraries/include
- Creating Raw CMake project Learning CMake: https://www.youtube.com/watch?v=mKZ-i-UfGgQ https://codevion.github.io/#!cpp/cmake.md
Older yt video: https://www.youtube.com/watch?v=nlKcXPUJGwA&list=PLalVdRk2RC6o5GHu618ARWh0VO0bFlif4&index=1&t=0s
Documentation: https://cmake.org/cmake/help/latest/guide/tutorial/index.html
-
adding OpenGL library to CMake https://stackoverflow.com/questions/18647976/missing-opengl-headers-on-mac
-
If you are using the static library version of GLFW, add it and the Cocoa, OpenGL and IOKit frameworks to the project as dependencies. They can all be found in /System/Library/Frameworks. https://www.glfw.org/docs/latest/build.html#:~:text=the%20project%20dependencies.-,If%20you%20are%20using%20the%20static%20library%20version%20of%20GLFW%2C%20add,.,-With%20command%2Dline
https://stackoverflow.com/questions/2908640/how-to-add-a-framework-to-cmake
https://stackoverflow.com/questions/57129755/problems-with-cmakelists-txt-for-osx-windows-compilation https://stackoverflow.com/q/57129755/9229695
- Failed to create GLFW window? glfwWindowHint(GLFW_OPENGL_FORWARD_COMPAT, GLFW_TRUE); // Mac https://stackoverflow.com/questions/66152815/failed-to-create-glfw-window https://stackoverflow.com/a/22889120/9229695