DiligentGraphics / DiligentEngine

A modern cross-platform low-level graphics library and rendering framework
http://diligentgraphics.com/diligent-engine/
Apache License 2.0
3.63k stars 331 forks source link

cmake problems when generating visual studio project #200

Closed delphifirst closed 2 years ago

delphifirst commented 2 years ago

When I clicked "Configure" to generate visual studio project, I got the following error:

CMake Error at DiligentCore/BuildUtils.cmake:314 (add_custom_command):
  add_custom_command called with OUTPUT containing a "<".  This character is
  not allowed.
Call Stack (most recent call first):
  DiligentCore/CMakeLists.txt:464 (install_combined_static_lib)

I searched and found that it seems we should change $<CONFIG> to $<CMAKE_CFG_INTDIR>. (https://cmake.org/pipermail/cmake/2014-August/058375.html). I tried and this works for me.

I'm not sure whether this is the correct solution, so I create this issue.

TheMostDiligent commented 2 years ago

The correct solution is to update CMake to the latest version

delphifirst commented 2 years ago

OK. Maybe the build guide should be updated. It says cmake 3.16 or later is required, so I just use cmake 3.16.