guillaumeblanc / ozz-animation

Open source c++ skeletal animation library and toolset
http://guillaumeblanc.github.io/ozz-animation/
Other
2.46k stars 302 forks source link

cmake won't find or use vs2019 #89

Closed datgame closed 4 years ago

datgame commented 4 years ago

Starting cmake 3.16.4 or 3.15.19101501-MSVC_2 from a "x64 native tools command prompts for vs 2019" window fails with: D:\dev\thirdparty\ozz-animation\build>cmake .. -- Selecting Windows SDK version 10.0.18362.0 to target Windows 10.0.18363. -- The C compiler identification is unknown -- The CXX compiler identification is unknown CMake Error at CMakeLists.txt:4 (project): No CMAKE_C_COMPILER could be found. CMake Error at CMakeLists.txt:4 (project): No CMAKE_CXX_COMPILER could be found.

and launching cmake from a plain cmd.exe locates vs2017 which works fine. using a "x64 native tools command prompts for vs 2017" works fine too.

there's "LINK : fatal error LNK1104: cannot open file 'MSVCRTD.lib'" in CMakeError.log when it fails,

Not a big deal, since vs2017 and 2019 are compatible. Just wanted to log it here.

guillaumeblanc commented 4 years ago

Hi,

I couldn't reproduce this issue, from x64 native tools command prompts or a cmd. I'm pretty sure though that I experienced it in the past also. I think it's a msvc setup issue.

Are you running a fresh vs2019 install? If so, you could try running the usual vcvarsall.bat, or try creating a new c++ project from the wizard so msvc does the required c++ setup (and download missing components if any).

Hope it helps, Guillaume