首页 > 解决方案 > 尝试使用 CMake 时出现大量错误行?

问题描述

基本上每次我在成功配置后尝试在 CMake 上生成时都会响应一个巨大的错误行,我已经阅读了这个,但我不明白它的含义。我从 GLFW 官方网站(版本 3.18)下载了 GLFW 文件。请帮助我,因为我真的很想学习 OpenGL。

  Cannot find source file:

    clipboard.c

  Tried extensions .c .C .c++ .cc .cpp .cxx .cu .m .M .mm .h .hh .h++ .hm
  .hpp .hxx .in .txx


CMake Error at CMakeLists.txt:39 (add_executable):
  Cannot find source file:

    events.c

  Tried extensions .c .C .c++ .cc .cpp .cxx .cu .m .M .mm .h .hh .h++ .hm
  .hpp .hxx .in .txx


CMake Error at CMakeLists.txt:40 (add_executable):
  Cannot find source file:

    msaa.c

  Tried extensions .c .C .c++ .cc .cpp .cxx .cu .m .M .mm .h .hh .h++ .hm
  .hpp .hxx .in .txx


CMake Error at CMakeLists.txt:41 (add_executable):
  Cannot find source file:

    glfwinfo.c

  Tried extensions .c .C .c++ .cc .cpp .cxx .cu .m .M .mm .h .hh .h++ .hm
  .hpp .hxx .in .txx


CMake Error at CMakeLists.txt:42 (add_executable):
  Cannot find source file:

    iconify.c

  Tried extensions .c .C .c++ .cc .cpp .cxx .cu .m .M .mm .h .hh .h++ .hm
  .hpp .hxx .in .txx


CMake Error at CMakeLists.txt:43 (add_executable):
  Cannot find source file:

    monitors.c

  Tried extensions .c .C .c++ .cc .cpp .cxx .cu .m .M .mm .h .hh .h++ .hm
  .hpp .hxx .in .txx


CMake Error at CMakeLists.txt:44 (add_executable):
  Cannot find source file:

    reopen.c

  Tried extensions .c .C .c++ .cc .cpp .cxx .cu .m .M .mm .h .hh .h++ .hm
  .hpp .hxx .in .txx


CMake Error at CMakeLists.txt:45 (add_executable):
  Cannot find source file:

    cursor.c

  Tried extensions .c .C .c++ .cc .cpp .cxx .cu .m .M .mm .h .hh .h++ .hm
  .hpp .hxx .in .txx


CMake Error at CMakeLists.txt:47 (add_executable):
  Cannot find source file:

    empty.c

  Tried extensions .c .C .c++ .cc .cpp .cxx .cu .m .M .mm .h .hh .h++ .hm
  .hpp .hxx .in .txx


CMake Error at CMakeLists.txt:48 (add_executable):
  Cannot find source file:

    gamma.c

  Tried extensions .c .C .c++ .cc .cpp .cxx .cu .m .M .mm .h .hh .h++ .hm
  .hpp .hxx .in .txx


CMake Error at CMakeLists.txt:49 (add_executable):
  Cannot find source file:

    icon.c

  Tried extensions .c .C .c++ .cc .cpp .cxx .cu .m .M .mm .h .hh .h++ .hm
  .hpp .hxx .in .txx


CMake Error at CMakeLists.txt:50 (add_executable):
  Cannot find source file:

    inputlag.c

  Tried extensions .c .C .c++ .cc .cpp .cxx .cu .m .M .mm .h .hh .h++ .hm
  .hpp .hxx .in .txx


CMake Error at CMakeLists.txt:51 (add_executable):
  Cannot find source file:

    joysticks.c

  Tried extensions .c .C .c++ .cc .cpp .cxx .cu .m .M .mm .h .hh .h++ .hm
  .hpp .hxx .in .txx


CMake Error at CMakeLists.txt:54 (add_executable):
  Cannot find source file:

    threads.c

  Tried extensions .c .C .c++ .cc .cpp .cxx .cu .m .M .mm .h .hh .h++ .hm
  .hpp .hxx .in .txx


CMake Error at CMakeLists.txt:52 (add_executable):
  Cannot find source file:

    opacity.c

  Tried extensions .c .C .c++ .cc .cpp .cxx .cu .m .M .mm .h .hh .h++ .hm
  .hpp .hxx .in .txx


CMake Error at CMakeLists.txt:53 (add_executable):
  Cannot find source file:

    tearing.c

  Tried extensions .c .C .c++ .cc .cpp .cxx .cu .m .M .mm .h .hh .h++ .hm
  .hpp .hxx .in .txx


CMake Error at CMakeLists.txt:55 (add_executable):
  Cannot find source file:

    timeout.c

  Tried extensions .c .C .c++ .cc .cpp .cxx .cu .m .M .mm .h .hh .h++ .hm
  .hpp .hxx .in .txx


CMake Error at CMakeLists.txt:56 (add_executable):
  Cannot find source file:

    title.c

  Tried extensions .c .C .c++ .cc .cpp .cxx .cu .m .M .mm .h .hh .h++ .hm
  .hpp .hxx .in .txx


CMake Error at CMakeLists.txt:57 (add_executable):
  Cannot find source file:

    triangle-vulkan.c

  Tried extensions .c .C .c++ .cc .cpp .cxx .cu .m .M .mm .h .hh .h++ .hm
  .hpp .hxx .in .txx


CMake Error at CMakeLists.txt:58 (add_executable):
  Cannot find source file:

    windows.c

  Tried extensions .c .C .c++ .cc .cpp .cxx .cu .m .M .mm .h .hh .h++ .hm
  .hpp .hxx .in .txx


CMake Error at CMakeLists.txt:38 (add_executable):
  No SOURCES given to target: clipboard


CMake Error at CMakeLists.txt:39 (add_executable):
  No SOURCES given to target: events


CMake Error at CMakeLists.txt:40 (add_executable):
  No SOURCES given to target: msaa


CMake Error at CMakeLists.txt:41 (add_executable):
  No SOURCES given to target: glfwinfo


CMake Error at CMakeLists.txt:42 (add_executable):
  No SOURCES given to target: iconify


CMake Error at CMakeLists.txt:43 (add_executable):
  No SOURCES given to target: monitors


CMake Error at CMakeLists.txt:44 (add_executable):
  No SOURCES given to target: reopen


CMake Error at CMakeLists.txt:45 (add_executable):
  No SOURCES given to target: cursor


CMake Error at CMakeLists.txt:47 (add_executable):
  No SOURCES given to target: empty


CMake Error at CMakeLists.txt:48 (add_executable):
  No SOURCES given to target: gamma


CMake Error at CMakeLists.txt:49 (add_executable):
  No SOURCES given to target: icon


CMake Error at CMakeLists.txt:50 (add_executable):
  No SOURCES given to target: inputlag


CMake Error at CMakeLists.txt:51 (add_executable):
  No SOURCES given to target: joysticks


CMake Error at CMakeLists.txt:54 (add_executable):
  No SOURCES given to target: threads


CMake Error at CMakeLists.txt:52 (add_executable):
  No SOURCES given to target: opacity


CMake Error at CMakeLists.txt:53 (add_executable):
  No SOURCES given to target: tearing


CMake Error at CMakeLists.txt:55 (add_executable):
  No SOURCES given to target: timeout


CMake Error at CMakeLists.txt:56 (add_executable):
  No SOURCES given to target: title


CMake Error at CMakeLists.txt:57 (add_executable):
  No SOURCES given to target: triangle-vulkan


CMake Error at CMakeLists.txt:58 (add_executable):
  No SOURCES given to target: windows

我该如何解决这个问题,这也是我从 GLFW 为 Visual Studio 2019 下载的文件。文件(不是 rickroll,别担心):http ://www.mediafire.com/file/576nmghv6bbt36y/GLFW_Error_Files.zip/文件

标签: cmake

解决方案


推荐阅读