-
Notifications
You must be signed in to change notification settings - Fork 313
VS2012 CMake Fix
halfnelson edited this page Mar 8, 2014
·
1 revision
Visual studio 2012 can fail to be detected properly by cmake and can cause errors running create-projects-win.bat.
Find the CMakeVS11FindMake.cmake file under cmake/share/cmake-2.8/Modules and replace the contents with
set(_FDIR "[HKEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft\\VisualStudio\\SxS\\VC7;FrameworkDir32]")
set(_FVER "[HKEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft\\VisualStudio\\SxS\\VC7;FrameworkVer32]")
find_program(CMAKE_MAKE_PROGRAM
NAMES MSBuild
HINTS
${_FDIR}/${_FVER}
[HKEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft\\VisualStudio\\11.0\\Setup\\VS;ProductDir]
"$ENV{SYSTEMROOT}/Microsoft.NET/Framework/[HKEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft\\VisualStudio\\11.0;CLR Version]/"
"c:/WINDOWS/Microsoft.NET/Framework/[HKEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft\\VisualStudio\\11.0;CLR Version]/"
"$ENV{SYSTEMROOT}/Microsoft.NET/Framework/[HKEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft\\VCExpress\\11.0;CLR Version]/")
mark_as_advanced(CMAKE_MAKE_PROGRAM)
set(MSVC11 1)
set(MSVC_VERSION 1700)
This will force it to use msbuild instead of devenv.exe