build - 构建 OGRE 时出现 Cmake 错误

标签 build cmake ogre

我正在使用 cmake ../../ogre_src_v1-8-1 构建 OGRE 源代码在我的 build目录。我调查了许多类似的错误,但没有任何结果对我有用。

上面提到的 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!

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

最佳答案

它缺少 freetype构建 OGRE 所需的库。确保 lib 本身和开发包已安装在您的系统上。
这可能会有所帮助,OGRE wiki 页面提供了各种 Linux 发行版的先决条件的安装说明 Install OGRE Prerequisite

关于build - 构建 OGRE 时出现 Cmake 错误,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/25700006/

相关文章:

c++ - 在 Visual Studio 的 CMake 中启用对 C++17 的支持

cmake找不到头文件

c++ - 如何禁用来自非项目文件的警告? --- Visual Studio 2010

java - 跨一系列依赖项构建多个 Maven Artifact

emacs - 我怎样才能让编译缓冲区把点放在它的末尾?

visual-studio - 解决 "The command "taskkill/F/IM MyApp.vshost.exe"exited with code 128"错误

macos - 如何在Mac上构建(OpenGL Engine Ogre)SDK?

macos - 如何在 Mac OS X 上将 OpenSSL 构建为 32 位 (i386)?

c++ - cc1plus.exe : error: unrecognized command line option '-fdump-class-hierarchy' with CMake

c++ - Ogre3d:遍历子节点错误