CMakeVS11FindMake.cmake 2.6 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253
  1. #=============================================================================
  2. # Copyright 2007-2011 Kitware, Inc.
  3. #
  4. # Distributed under the OSI-approved BSD License (the "License");
  5. # see accompanying file Copyright.txt for details.
  6. #
  7. # This software is distributed WITHOUT ANY WARRANTY; without even the
  8. # implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
  9. # See the License for more information.
  10. #=============================================================================
  11. # (To distribute this file outside of CMake, substitute the full
  12. # License text for the above reference.)
  13. # Look for devenv as a build program. We need to use this to support
  14. # Intel Fortran integration into VS. MSBuild can not be used for that case
  15. # since Intel Fortran uses the older devenv file format.
  16. find_program(CMAKE_MAKE_PROGRAM
  17. NAMES devenv
  18. HINTS
  19. [HKEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft\\VisualStudio\\11.0\\Setup\\VS;EnvironmentDirectory]
  20. [HKEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft\\VisualStudio\\11.0\\Setup;Dbghelp_path]
  21. "$ENV{ProgramFiles}/Microsoft Visual Studio 11.0/Common7/IDE"
  22. "$ENV{ProgramFiles}/Microsoft Visual Studio11.0/Common7/IDE"
  23. "$ENV{ProgramFiles}/Microsoft Visual Studio 11/Common7/IDE"
  24. "$ENV{ProgramFiles}/Microsoft Visual Studio11/Common7/IDE"
  25. "$ENV{ProgramFiles} (x86)/Microsoft Visual Studio 11.0/Common7/IDE"
  26. "$ENV{ProgramFiles} (x86)/Microsoft Visual Studio11.0/Common7/IDE"
  27. "$ENV{ProgramFiles} (x86)/Microsoft Visual Studio 11/Common7/IDE"
  28. "$ENV{ProgramFiles} (x86)/Microsoft Visual Studio11/Common7/IDE"
  29. "/Program Files/Microsoft Visual Studio 11.0/Common7/IDE/"
  30. "/Program Files/Microsoft Visual Studio 11/Common7/IDE/"
  31. )
  32. # if devenv is not found, then use MSBuild.
  33. # it is expected that if devenv is not found, then we are
  34. # dealing with Visual Studio Express.
  35. if(NOT CMAKE_CROSSCOMPILING)
  36. set(_FDIR "[HKEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft\\VisualStudio\\SxS\\VC7;FrameworkDir32]")
  37. set(_FVER "[HKEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft\\VisualStudio\\SxS\\VC7;FrameworkVer32]")
  38. find_program(CMAKE_MAKE_PROGRAM
  39. NAMES MSBuild
  40. HINTS
  41. ${_FDIR}/${_FVER}
  42. [HKEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft\\VisualStudio\\11.0\\Setup\\VS;ProductDir]
  43. "$ENV{SYSTEMROOT}/Microsoft.NET/Framework/[HKEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft\\VisualStudio\\11.0;CLR Version]/"
  44. "c:/WINDOWS/Microsoft.NET/Framework/[HKEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft\\VisualStudio\\11.0;CLR Version]/"
  45. "$ENV{SYSTEMROOT}/Microsoft.NET/Framework/[HKEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft\\VCExpress\\11.0;CLR Version]/")
  46. endif()
  47. mark_as_advanced(CMAKE_MAKE_PROGRAM)
  48. set(MSVC11 1)
  49. set(MSVC_VERSION 1700)