我正在尝试为 Ubuntu 构建 Voxelands,但是出现失败cmake
错误。OpenGL
我应该安装什么包才能cmake
正确构建?
这是我的构建错误:
sayth ~/Downloads/voxelands-master-2e653e147710f4b07a7bca4a080b208c13423cba $ cmake -DRUN_IN_PLACE=1
-- *** Will build version 1704.00 ***
-- IRRLICHT_SOURCE_DIR =
-- IRRLICHT_INCLUDE_DIR = IRRLICHT_INCLUDE_DIR-NOTFOUND
-- IRRLICHT_LIBRARY = IRRLICHT_LIBRARY-NOTFOUND
-- Could NOT find IRRLICHT (missing: IRRLICHT_LIBRARY IRRLICHT_INCLUDE_DIR)
-- gettext msgfmt path: /usr/bin/msgfmt
-- GetText enabled; locales found: ja;vi;nl;pl;hy;fr;ru;ro;hu;it;pt_BR;de;jbo;es;da
-- Sound enabled
CMake Error at /usr/share/cmake-3.5/Modules/FindPackageHandleStandardArgs.cmake:148 (message):
Could NOT find OpenGL (missing: OPENGL_gl_LIBRARY OPENGL_INCLUDE_DIR)
Call Stack (most recent call first):
/usr/share/cmake-3.5/Modules/FindPackageHandleStandardArgs.cmake:388 (_FPHSA_FAILURE_MESSAGE)
/usr/share/cmake-3.5/Modules/FindOpenGL.cmake:172 (FIND_PACKAGE_HANDLE_STANDARD_ARGS)
src/CMakeLists.txt:110 (find_package)
-- Configuring incomplete, errors occurred!
See also "/home/sayth/Downloads/voxelands-master-2e653e147710f4b07a7bca4a080b208c13423cba/CMakeFiles/CMakeOutput.log".
答案1
当前与 OpenGL 相关的错误可能是由于缺少库所致libgl1-mesa-dev
。可以使用 进行安装sudo apt install libgl1-mesa-dev
。
看起来你可能还libirrlicht-dev
缺少库,甚至可能还有更多。
查看文档,需要一些库。可能需要执行以下操作:
sudo apt install libopenal-dev libvorbis-dev libfreetype6-dev libx11-dev libirrlicht-dev libgl1-mesa-dev libjpeg-dev libbz2-dev
这应该安装所有必需的库以使您能够构建应用程序。