blurrypiano / littleVulkanEngine

Code repo for video tutorial series teaching Vulkan and computer graphics
MIT License
829 stars 147 forks source link

CMake Error #28

Open Ch1ckenfr1edr1ce opened 2 years ago

Ch1ckenfr1edr1ce commented 2 years ago

The error says, "CMake Error at CMakeLists.txt:47 (find_package): By not providing "Findglfw3.cmake" in CMAKE_MODULE_PATH this project has asked CMake to find a package configuration file provided by "glfw3", but CMake did not find one.

Could not find a package configuration file provided by "glfw3" (requested version 3.3) with any of the following names:

glfw3Config.cmake
glfw3-config.cmake

Add the installation prefix of "glfw3" to CMAKE_PREFIX_PATH or set "glfw3_DIR" to a directory containing one of the above files. If "glfw3" provides a separate development package or SDK, be sure it has been installed."

I made sure to update the .env file and I looked through the CMakeLists to make sure that all the paths were correct.

junglie85 commented 2 years ago

Did you rename the relevant env file from either envUnixExample.cmake or envWindowsExample.cmake to env.cmake? The call to find_package(glfw3 3.3 REQUIRED) on line 47 will only happen if you've not specified a value for GLFW_PATH and set it in the env file. You could also set it as a cache variable with -DGLFW_PATH=....

Since it looks like you're not setting a custom path, you could also install GLFW globally, which should allow find_package to locate the library correctly.