cmake 为什么只有一些Ogre3D依赖项是为Release构建的,而其他依赖项是为Python构建的?

i86rm4rw  于 7个月前  发布在  其他
关注(0)|答案(1)|浏览(77)

我正在构建Ogre版本14.1.1 Github链接https://github.com/OGRECave/ogre Windows 10渲染器d3 d11
我在这两个依赖项上遇到了问题:OgreBullet,Assimp
我已经遵循了官方的构建教程,并遵循了论坛讨论的任何修复。构建教程链接:https://ogrecave.github.io/ogre/api/latest/building-ogre.html
这些是我正在做的步骤:
1.已下载存储库并将其解压缩。
1.我在里面做了一个文件夹/build/debug。
1.然后从文件夹路径转到cmd提示符并初始化一个变量。这是因为依赖关系是在CMake的配置阶段构建的,我们必须通过命令行指定所需的CMAKE_BUILD_TYPE。在CMake GUI中更改值将不会产生任何影响。set CMAKE_BUILD_TYPE=Debug
1.然后在命令提示符下运行cmake-gui.exe -DCMAKE_BUILD-TYPE=Debug
1.然后在CMAKE界面打开后,我点击BrowseSource来设置下载的仓库文件夹。
1.在BrowseBuild中,我设置/build/debug文件夹
1.我打配置按钮,然后与给定的设置(调试构建)我生成,如果没有发生错误。x1c 0d1x
1.然后在Visual Studio 2022中打开生成的解决方案。
1.我为预定义的目标“ALL_BUILD”构建
我已经能够为调试构建一次,这样Assimp就可以工作了。我在Ogre中与Assimp一起工作。但是现在我也在尝试构建OgreBullet,现在这两个依赖项都无法在调试中构建。
依赖关系是在配置过程中构建的。

Selecting Windows SDK version 10.0.22621.0 to target Windows 10.0.19045.
Configuring OGRE 14.1.1
DEPENDENCIES_DIR: D:/Ogre_3/ogre-master/build/debug/Dependencies
Looking for FreeImage...
Could NOT find PkgConfig (missing: PKG_CONFIG_EXECUTABLE) 
Could not locate FreeImage
Looking for DirectX9...
Could not locate DirectX9
Looking for DirectX11...
Found DirectX11 headers: C:/Program Files (x86)/Windows Kits/10/Include/10.0.22621.0/um
Found DirectX11: d3d11.lib;dxgi.lib;dxguid.lib
Looking for Cg...
Could NOT find PkgConfig (missing: PKG_CONFIG_EXECUTABLE) 
Could not locate Cg
CMake Warning (dev) at CMake/Dependencies.cmake:278 (find_package):
  Policy CMP0148 is not set: The FindPythonInterp and FindPythonLibs modules
  are removed.  Run "cmake --help-policy CMP0148" for policy details.  Use
  the cmake_policy command to set the policy and suppress this warning.

Call Stack (most recent call first):
  CMakeLists.txt:284 (include)
This warning is for project developers.  Use -Wno-dev to suppress it.

Could NOT find PythonInterp (missing: PYTHON_EXECUTABLE) 
CMake Warning (dev) at CMake/Dependencies.cmake:279 (find_package):
  Policy CMP0148 is not set: The FindPythonInterp and FindPythonLibs modules
  are removed.  Run "cmake --help-policy CMP0148" for policy details.  Use
  the cmake_policy command to set the policy and suppress this warning.

Call Stack (most recent call first):
  CMakeLists.txt:284 (include)
This warning is for project developers.  Use -Wno-dev to suppress it.

Could NOT find PythonLibs (missing: PYTHON_LIBRARIES PYTHON_INCLUDE_DIRS) 
Looking for Softimage...
Could not locate Softimage
send_errorD:/Ogre_3/ogre-master/build/debug/Dependencies/bin/debug/libGLESv2.dll did not exist, can't install!
send_errorD:/Ogre_3/ogre-master/build/debug/Dependencies/bin/release/libEGL.dll did not exist, can't install!
Looking for GLSL_Optimizer...
Could NOT find PkgConfig (missing: PKG_CONFIG_EXECUTABLE) 
Could not locate GLSL_Optimizer
Could NOT find PkgConfig (missing: PKG_CONFIG_EXECUTABLE) 

-----------------------------------------------------------------------------
-- The following external packages were located on your system.
-- This installation will have the extra features provided by these packages.
+ freetype
+ OpenGL
+ OpenGL ES 2.x
+ DirectX11
+ pugixml
+ zlib
+ Assimp
+ Bullet
+ SDL2
-----------------------------------------------------------------------------
-- The following OPTIONAL packages could NOT be located on your system.
-- Consider installing them to enable more features from this software.
+ freeimage: Support for commonly used graphics image formats <http://freeimage.sourceforge.net>
+ DirectX9: Support for the DirectX render system <http://msdn.microsoft.com/en-us/directx/>
+ cg: C for graphics shader language <http://developer.nvidia.com/object/cg_toolkit.html>
+ Vulkan SDK: Vulkan RenderSystem, glslang Plugin. Alternatively use system packages <https://vulkan.lunarg.com/>
+ OpenEXR: Load High dynamic range images <http://www.openexr.com/>
+ Python: Language bindings to use OGRE from Python <http://www.python.org/>
+ SWIG: Language bindings (Python, Java, C#) for OGRE <http://www.swig.org/>
+ Qt: optional integration with the Qt Library for window creation and input <http://www.qt.io/>
+ Doxygen: Tool for building API documentation <http://doxygen.org>
+ Softimage: Softimage SDK needed for building XSIExporter <>
+ GLSL Optimizer: GLSL Optimizer <http://github.com/aras-p/glsl-optimizer/>
+ HLSL2GLSL: HLSL2GLSL <http://hlsl2glslfork.googlecode.com/>
-----------------------------------------------------------------------------

----------------------------------------------------------------------------
  FEATURE SUMMARY
----------------------------------------------------------------------------

Building components:
  + Bites
  + Bullet
  + MeshLodGenerator
  + Overlay
  + Overlay Dear Imgui
  + Paging
  + Property
  + RTShader System
  + RTShader System Shaders
  + Terrain
  + Volume
Building plugins:
  + BSP scene manager
  + Octree scene manager
  + STBI codec (generic)
  + Portal connected zone scene manager
  + Particle FX
  + DotScene loader
  + Assimp loader (.obj, .ply, .fbx and more)
Building rendersystems:
  + Direct3D 11
  + OpenGL
  + OpenGL 3+
  + OpenGL ES2/ ES3
Building executables:
  + Samples
  + Tools
Building core features:
  + Mesh Lod
  + DDS image codec (.dds)
  + ETC image codec (.pkm, .ktx) 
  + ASTC image codec (.astc)
  + ZIP archives
  + Multi-threaded WorkQueue

Build type:                      shared
Use double precision:            disabled
Assert mode:                     release exceptions

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

Configuring done (1.9s)
Generating done (0.4s)

字符串

rkttyhzu

rkttyhzu1#

Visual Studio生成的项目会要求你从它的四个默认值中选择你的构建类型(Release,Rebuild,MinSizeRel & RelWithDebInfo),即使项目是用CMake生成的。在生成你的Visual Studio项目后,知道构建失败现在是它自己的问题了。你没有提到这个问题,但我假设你面临着链接错误,因为在CMake中你可以看到:

BULLET_SOFTBODY_LIBRARY=C:/....
BULLET_SOFTBODY_LBRARY_DEBUG=BULLET_SOFTBODY_LBRARY_DEBUG-NOTFOUND

字符串
提示您没有此项目符号库的调试库。因此,如果您尝试构建它,它将没有可链接到的调试库。如果库确实存在,请确保将CMake变量设置为该库的位置。但如果这不是您的问题,那么发布错误消息将非常有用。

相关问题