主要是CMakeLists.txt文件变化
cmake_minimum_required(VERSION 3.10)
project(glfwTest)
set(CMAKE_CXX_STANDARD 11)
aux_source_directory(. SRC_SOURCES)
set(GLFW_INCLUDE_DIR ${CMAKE_SOURCE_DIR}/include)
set(GLFW_LIBRARY_DIR ${CMAKE_SOURCE_DIR}/lib/glfw)
add_executable(glfwTest ${SRC_SOURCES})
target_link_libraries(glfwTest opengl32) # 链接库文件
target_include_directories(glfwTest PUBLIC ${GLFW_INCLUDE_DIR})
target_link_directories(glfwTest PUBLIC ${GLFW_LIBRARY_DIR})
target_link_libraries(glfwTest glfw3dll.lib )
其它事项请参考GLFW入门-CSDN博客https://blog.csdn.net/sq8706/article/details/139183884?spm=1001.2014.3001.5501