GLFW with CMake on Windows, GLFW_INCLUDE_DIRS or GLFW_LIBRARIES not set

If you’d like to request a feature use the GLFW issue list on Github.

Personally I don’t install libraries, so my process for using glfw with cmake on Windows and other OSs is to put glfw in a known directory (here below the cmakelists.txt dir for my project):

find_package(OpenGL REQUIRED)

include_directories("glfw/include")

set( ENKITS_BUILD_EXAMPLES OFF CACHE BOOL "Build basic example applications" )
set( GLFW_BUILD_EXAMPLES OFF CACHE BOOL  "GLFW lib only" )
set( GLFW_BUILD_TESTS OFF CACHE BOOL  "GLFW lib only" )
set( GLFW_BUILD_DOCS OFF CACHE BOOL  "GLFW lib only" )
set( GLFW_BUILD_INSTALL OFF CACHE BOOL  "GLFW lib only" )

add_subdirectory( glfw )

target_link_libraries( executablename glfw ${GLFW_LIBRARIES} )