I have compiled glfw and installed at “C:\program files\GLFW”, it all works fine. Then I add “C:\Program Files\GLFW” to the system environment variable named glfw3_DIR. But when I was add glfw to my own program by writing find_package(glfw3 REQUIRED) in the CMakelists.txt, the cmake cannot find the header and library path of glfw, it can only find the root dir of glfw.
More specifically, cmake only show 3 entry:
There are no header path or lib path, so when I compile my program, it occurred an error:
“GLFW/glfw3.h”: No such file or directory
I also noticed there is a glfw3.pc file at the glfw directory, however my cmake can’t use pkgconfig on windows.
How to solve this problem?