CMake support for Visual Studio Express 2017
Microsoft seemed to be canceling the "Express Edition" of Visual Studio, but they've now released Visual Studio Express 2017 for Windows Desktop (with a footnoted caveat that 2017 will be the "last version" of Express...)
(Steps to get it:
- https://www.visualstudio.com/vs/visual-studio-express/
- ignore the bold suggestion at the top of the page to "Download Community 2017"
- scroll down to where it says "Still want Visual Studio Express?" and click "Express 2017 for Windows Desktop" to download)
I encountered just one problem using CMake 3.9.4 with VS 2017 Express, but it has a workaround. I run cmake-gui from where it was installed (on the Windows 10 menu), press Configure on a new project, select "Visual Studio 15 2017 Win64" generator, and immediately get:
CMake Error at [...] (enable_language):
Failed to run MSBuild command:
MSBuild.exe
to get the value of VCTargetsPath:
Peeking at cmGlobalVisualStudio15Generator::FindMSBuildCommand() suggests that perhaps vsSetupAPIHelper.GetVSInstanceInfo() is returning false. Running "Developer Command Prompt for Visual Studio 2017" and manually typing the full path to cmake-gui (e.g. "C:\Program Files\CMake\bin\cmake-gui.exe") seems to be a successful workaround. (Maybe setting VS150COMNTOOLS and/or other environment variables would work too?)
I believe for prior Express editions cmake found everything using the registry so as not to require setting environment variables or running cmake or cmake-gui from within the Developer Prompt. Something similar may resolve this for VS 2017 Express.