运行以下cmake config时出现错误
cmake_minimum_required(VERSION 3.14)
project(vertex)
add_executable(vortex expositive.cpp)
set(CMAKE_WINDOWS_EXPORT_ALL_SYMBOLS ON)
add_subdirectory(plugins/glfw)
set( GLFW_BUILD_DOCS OFF CACHE BOOL "" FORCE )
set( GLFW_BUILD_TESTS OFF CACHE BOOL "" FORCE )
set( GLFW_BUILD_EXAMPLES OFF CACHE BOOL "" FORCE )
set(glew_DIR C:/Users/Users/AppData/Local/nvim/plugins/plugins/glew/lib/Release/x64)
target_include_directories(vortex PUBLIC plugins/glfw/include)
target_include_directories(vortex PUBLIC ${PROJECT_SOURCE_DIR}/glew/include)
#target_compile_definitions(vortex PRIVATE GLEW_STATIC)
target_link_directories(vortex PUBLIC plugins/glfw/src PUBLIC plugins/glew/bin/Release/x64)
find_library(GLEW_LIBRARY NAMES glew32s PATH_SUFFIXES glew_DIR)
find_package(glm REQUIRED)
target_link_libraries(vortex glew32s glfw glm::glm)
find_package(OpenGL REQUIRED)
if (OPENGL_FOUND)
message("opengl found")
message("include dir: ${OPENGL_INCLUDE_DIR}")
message("link libraries: ${OPENGL_gl_LIBRARY}")
else (OPENGL_FOUND)
message("opengl not found")
endif()
target_link_libraries(vortex ${OPENGL_gl_LIBRARY})
我在类似问题的建议答案中有各种选择(例如直接使用 find_package),但我没有解决我的错误。我正在使用 MSVC 2019 进行编译。