Learning OpenGL from site https://learnopengl.com/Introduction
First you need setup GLAD (used major version 1) to cmake option because glad can't be seen by cmake automatically, and you can optionally set up other libs paths if you want (or like on windows needed). Libs you can set up to cmake build:
- glad (required, folder), use
-DGLAD_PATH=/path/to/folder - glfw (optional, folder and file), use
-DGLFW_PATH=/path/to/folderand-DGLFW_LIB=/path/to/file(.a, .so, .lib, .dll) - glm (optional, folder), use
-DGLFM_PATH=/path/to/folder - assimp (optional, folder and file), use
-DASSIMP_PATH=/path/to/folderand-DASSIMP_LIB=/path/to/file(.a, .so, .lib, .dll)
If you have CMake GUI you can skip configuration command below.
Just select build folder, specify libs paths and press Configure then Generate.
For building use commands:
# Configuring (can be skipped when use CMake GUI)
cmake -DGLAD_PATH=/path/to/folder -S . -B build
# Building
cmake --build ./build -- -j4