Building using cmake issues when configuring

Hey hello,
I checked the site compilation steps and i noticed that when writting the cmake file the documentation likes to use the add subdirectory method but i wanted to use the cmake find_package method but it seems CMake isnt able to find a certain file
CMake Error at C:/Libraries/glfw-3.4/build/src/glfw3Config.cmake:3 (include):
include could not find requested file:

C:/Libraries/glfw-3.4/build/src/glfw3Targets.cmake

Call Stack (most recent call first):
CMakeLists.txt:14 (find_package)
I know that i can use the easy method by manually adding it to the Visual studio properties
But using this way for me seems easier as i just need to configure a simple CMakeList text file for any new project without the need to add it manually if i just declare it in my system variables

The building applications with CMake and installed GLFW binaries details how to use find_package with GLFW, providing that you have installed GLFW on your system.

If you want to use GLFW source code with your CMake project I would check out this GLFW-CMake-starter, following the instructions in the readme.

1 Like