我正在尝试按照这个页面上的说明在ubuntu20.10上编译LiquidFun1.10:https://google.github.io/liquidfun/Building/html/md__building_linux.html
当我运行该命令时:
cd liquidfun/Box2D
cmake -G'Unix Makefiles'
make我得到了各种错误,构建失败。这是屏幕输出:
cmake -G'Unix Makefiles'
CMake Warning:
No source or binary directory provided. Both will be assumed to be the
same as the current working directory, but note that this warning will
become a fatal error in future CMake releases.
CMake Warning (dev) at /usr/share/cmake-3.16/Modules/FindOpenGL.cmake:275 (message):
Policy CMP0072 is not set: FindOpenGL prefers GLVND by default when
available. Run "cmake --help-policy CMP0072" for policy details. Use the
cmake_policy command to set the policy and suppress this warning.
FindOpenGL found both a legacy GL library:
OPENGL_gl_LIBRARY: /usr/lib/x86_64-linux-gnu/libGL.so
and GLVND libraries for OpenGL and GLX:
OPENGL_opengl_LIBRARY: /usr/lib/x86_64-linux-gnu/libOpenGL.so
OPENGL_glx_LIBRARY: /usr/lib/x86_64-linux-gnu/libGLX.so
OpenGL_GL_PREFERENCE has not been set to "GLVND" or "LEGACY", so for
compatibility with CMake 3.10 and below the legacy GL library will be used.
Call Stack (most recent call first):
CMakeLists.txt:120 (find_package)
This warning is for project developers. Use -Wno-dev to suppress it.
CMake Error at CMakeLists.txt:158 (set_target_properties):
set_target_properties Can not find target to add properties to: X11::X11
CMake Error at CMakeLists.txt:158 (set_target_properties):
set_target_properties Can not find target to add properties to: X11::ICE
CMake Error at CMakeLists.txt:158 (set_target_properties):
set_target_properties Can not find target to add properties to: X11::SM
CMake Error at CMakeLists.txt:158 (set_target_properties):
set_target_properties Can not find target to add properties to: X11::Xau
CMake Error at CMakeLists.txt:158 (set_target_properties):
set_target_properties Can not find target to add properties to:
X11::Xcursor
CMake Error at CMakeLists.txt:158 (set_target_properties):
set_target_properties Can not find target to add properties to: X11::Xdmcp
CMake Error at CMakeLists.txt:158 (set_target_properties):
set_target_properties Can not find target to add properties to: X11::Xext
CMake Error at CMakeLists.txt:158 (set_target_properties):
set_target_properties Can not find target to add properties to:
X11::Xxf86vm
CMake Error at CMakeLists.txt:158 (set_target_properties):
set_target_properties Can not find target to add properties to: X11::Xfixes
CMake Error at CMakeLists.txt:158 (set_target_properties):
set_target_properties Can not find target to add properties to: X11::Xi
CMake Error at CMakeLists.txt:158 (set_target_properties):
set_target_properties Can not find target to add properties to:
X11::Xinerama
CMake Error at CMakeLists.txt:158 (set_target_properties):
set_target_properties Can not find target to add properties to: X11::Xkb
CMake Error at CMakeLists.txt:158 (set_target_properties):
set_target_properties Can not find target to add properties to: X11::Xmu
CMake Error at CMakeLists.txt:158 (set_target_properties):
set_target_properties Can not find target to add properties to: X11::Xpm
CMake Error at CMakeLists.txt:158 (set_target_properties):
set_target_properties Can not find target to add properties to: X11::Xrandr
CMake Error at CMakeLists.txt:158 (set_target_properties):
set_target_properties Can not find target to add properties to:
X11::Xrender
CMake Error at CMakeLists.txt:158 (set_target_properties):
set_target_properties Can not find target to add properties to: X11::Xss
CMake Error at CMakeLists.txt:158 (set_target_properties):
set_target_properties Can not find target to add properties to: X11::Xt
CMake Error at CMakeLists.txt:158 (set_target_properties):
set_target_properties Can not find target to add properties to: X11::Xutil
CMake Error at CMakeLists.txt:158 (set_target_properties):
set_target_properties Can not find target to add properties to: X11::Xv
CMake Error at CMakeLists.txt:158 (set_target_properties):
set_target_properties Can not find target to add properties to:
Threads::Threads
CMake Error at CMakeLists.txt:158 (set_target_properties):
set_target_properties Can not find target to add properties to:
Threads::Threads
-- Configuring incomplete, errors occurred!还有其他人遇到过这个问题吗?
任何帮助我们都将不胜感激
发布于 2020-12-07 20:14:09
他们使用重新定义的add_library命令:liquidfun/Box2D/CMakeLists.txt:101来玩肮脏的游戏。而且他们似乎忘记了,一些FindXXX.cmake脚本可能会使用这个add_library创建导入的目标。
您可以尝试删除此重新定义:删除从function(add_library name)到endfunction(add_library)的行。但要做好准备,一些库将在未记录的位置创建。
为了克服警告“没有提供源代码或二进制目录”。将.参数添加到cmake调用中:
cmake -G'Unix Makefiles' .https://stackoverflow.com/questions/65181044
复制相似问题