OGRECave / ogre

scene-oriented, flexible 3D engine (C++, Python, C#, Java)
https://ogrecave.github.io/ogre/
MIT License
3.96k stars 976 forks source link

PCH doen't compile with cmake 3.14 and Visual Studio 2017 #2295

Closed Joilnen closed 2 years ago

Joilnen commented 2 years ago

Trying to build ogre3d, this configure but doesn't compile

+ Python
+ pugixml
+ zlib
+ Assimp
+ 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/>
+ SWIG: Language bindings (Python, Java, C#) for OGRE <http://www.swig.org/>
+ Qt: optional integration with the Qt5 Library for window creation and input <http://www.qt.io/>
+ Qt: optional integration with the Qt6 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 <FALSE>
+ GLSL Optimizer: GLSL Optimizer <http://github.com/aras-p/glsl-optimizer/>
+ HLSL2GLSL: HLSL2GLSL <http://hlsl2glslfork.googlecode.com/>
-----------------------------------------------------------------------------

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

Building components:
  + Bites
  + 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
Nodes inherit transform:         disabled
Assert mode:                     exceptions

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

-- Configuring done
-- Generating done
CMake Warning:
  Manually-specified variables were not used by the project:

    MAKE_SYSTEM_NAME

-- Build files have been written to: C:/Users/joilnen/Documents/ogre3d-13.2.1/build
PS C:\Users\joilnen\Documents\ogre3d-13.2.1\build> cmake --build . -j 4
Microsoft(R) Build Engine versão 15.9.21+g9802d43bc3 para .NET Framework
Copyright (C) Microsoft Corporation. Todos os direitos reservados.

  OgreMain_pch.cpp
C:\Users\joilnen\Documents\ogre3d-13.2.1\build\OgreMain\OgreMain_pch.cpp(1): fatal error C1083: Não é possível abrir ar
quivo incluir: '$<$<COMPILE_LANGUAGE:CXX>:C:/Users/joilnen/Documents/ogre3d-13.2.1/OgreMain/src/OgreStableHeaders.h>':
No such file or directory [C:\Users\joilnen\Documents\ogre3d-13.2.1\build\OgreMain\OgreMain.vcxproj]
PS C:\Users\joilnen\Documents\ogre3d-13.2.1\build>
paroj commented 2 years ago

which cmake version are you using? Also. -j 4 is not a valid cmake option.

Joilnen commented 2 years ago

I got this from "man cmake" "--parallel [], -j []" Using cmake 3.14 This compiled with cmake 3.22, maybe would be worth to change the version in docs, and "-j" worked fine.

paroj commented 2 years ago

this is probably an issue specific to cmake 3.14 and can be worked around by setting OGRE_ENABLE_PRECOMPILED_HEADERS=OFF.