构建OGRE时出现Cmake错误

4

我正在使用cmake ../../ogre_src_v1-8-1在我的build目录下构建OGRE源代码。我查看了许多类似的错误,但没有什么效果。

上述cmake命令的输出如下:

-- Configuring OGRE 1.8.1
-- Detected g++ 4.8

-- Enabling GCC visibility flags
-- Search path: /home/kamal/Documents/ogre_src_v1-8-1/build/Dependencies;/home/kamal/Documents/ogre_src_v1-8-1/Dependencies;/home/kamal/Documents/ogre_src_v1-8-1/build/../Dependencies;/home/kamal/Documents/ogre_src_v1-8-1/../Dependencies
-- Looking for ZLIB...
-- Found ZLIB: optimized;/usr/lib/x86_64-linux-gnu/libz.so;debug;/usr/lib/x86_64-linux-gnu/libz.so
-- Looking for ZZip...
-- Found ZZip: optimized;/usr/lib/x86_64-linux-gnu/libzzip.so;debug;/usr/lib/x86_64-linux-gnu/libzzip.so
-- Looking for FreeImage...
-- checking for module 'freeimage'
--   package 'freeimage' not found
-- Found FreeImage: optimized;/usr/lib/libfreeimage.so;debug;/usr/lib/libfreeimage.so
-- Looking for FREETYPE...
-- CMAKE_PREFIX_PATH: /home/kamal/Documents/ogre_src_v1-8-1/build/Dependencies;/home/kamal/Documents/ogre_src_v1-8-1/Dependencies;/home/kamal/Documents/ogre_src_v1-8-1/build/../Dependencies;/home/kamal/Documents/ogre_src_v1-8-1/../Dependencies;/usr/local;/usr/lib/x86_64-linux-gnu
-- CMAKE_PREFIX_PATH: /home/kamal/Documents/ogre_src_v1-8-1/build/Dependencies;/home/kamal/Documents/ogre_src_v1-8-1/Dependencies;/home/kamal/Documents/ogre_src_v1-8-1/build/../Dependencies;/home/kamal/Documents/ogre_src_v1-8-1/../Dependencies;/usr/local;/usr/lib/x86_64-linux-gnu
-- Could not locate FREETYPE
-- Looking for Cg...
-- checking for module 'Cg'
--   package 'Cg' not found
-- Found Cg: optimized;/usr/lib/x86_64-linux-gnu/libCg.so;debug;/usr/lib/x86_64-linux-gnu/libCg.so
-- Looking for POCO...
-- checking for module 'POCO'
--   package 'POCO' not found
-- Could not locate POCO
-- Looking for TBB...
-- Found TBB: optimized;/usr/lib/libtbb.so;debug;/usr/lib/libtbb.so
-- Looking for TBB_MALLOC...
-- Found TBB_MALLOC: optimized;/usr/lib/libtbbmalloc.so;debug;/usr/lib/libtbbmalloc.so
-- Looking for TBB_MALLOC_PROXY...
-- Found TBB_MALLOC_PROXY: optimized;/usr/lib/libtbbmalloc_proxy.so;debug;/usr/lib/libtbbmalloc_proxy.so
-- Looking for GLSL_Optimizer...
-- checking for module 'GLSL_Optimizer'
--   package 'GLSL_Optimizer' not found
-- Could not locate GLSL_Optimizer
-- Looking for HLSL2GLSL...
-- checking for module 'HLSL2GLSL'
--   package 'HLSL2GLSL' not found
-- Could not locate HLSL2GLSL
-- Looking for OIS...
-- Found OIS: optimized;/usr/lib/x86_64-linux-gnu/libOIS.so;debug;/usr/lib/x86_64-linux-gnu/libOIS.so
-- Looking for Softimage...
-- Could not locate Softimage
-- Looking for CppUnit...
-- checking for module 'cppunit'
--   package 'cppunit' not found
-- Could not locate CppUnit
CMake Error at CMake/Utils/MacroLogFeature.cmake:100 (MESSAGE):

-----------------------------------------------------------------------------

-- The following REQUIRED packages could NOT be located on your system.

-- Please install them before continuing this software installation.

-- If you are in Windows, try passing -DOGRE_DEPENDENCIES_DIR=<path to dependencies>

-----------------------------------------------------------------------------

+ freetype: Portable font engine <http://www.freetype.org>

-----------------------------------------------------------------------------
Call Stack (most recent call first):
CMake/Dependencies.cmake:234 (MACRO_DISPLAY_FEATURE_LOG)
CMakeLists.txt:194 (include)

-- Configuring incomplete, errors occurred!

如何解决这个问题?任何帮助都将不胜感激!
1个回答

5

缺少构建OGRE所需的freetype库。请确保您的系统上安装了该库本身和开发包。这可能会有所帮助,OGRE维基页面列出了各种Linux发行版的先决条件安装说明安装OGRE先决条件


2
我在系统上安装了libfreetype6libfreetype6-dev两个库。 - Kamalpreet Grewal
好的,但是CMake找不到它。您可以手动设置库和包含目录的变量,我发现通过cmake-gui进行操作更快,特别是如果您正在摆弄它们。 - lazycoder
谢谢。使用 cmake-gui 帮助更具体地理解了它。 - Kamalpreet Grewal

网页内容由stack overflow 提供, 点击上面的
可以查看英文原文,
原文链接