CMakeVS11FindMake.cmake 2.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354
  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. VCExpress has random
  35. # failures when being run as a command line build tool which
  36. # causes the compiler checks and try-compile stuff to fail. MSbuild
  37. # is a better choice for this. However, VCExpress does not support
  38. # cross compiling needed for Win CE.
  39. if(NOT CMAKE_CROSSCOMPILING)
  40. find_program(CMAKE_MAKE_PROGRAM
  41. NAMES MSBuild
  42. HINTS
  43. [HKEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft\\VisualStudio\\11.0\\Setup\\VS;ProductDir]
  44. "$ENV{SYSTEMROOT}/Microsoft.NET/Framework/[HKEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft\\VisualStudio\\11.0;CLR Version]/"
  45. "c:/WINDOWS/Microsoft.NET/Framework/[HKEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft\\VisualStudio\\11.0;CLR Version]/"
  46. "$ENV{SYSTEMROOT}/Microsoft.NET/Framework/[HKEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft\\VCExpress\\11.0;CLR Version]/")
  47. endif()
  48. mark_as_advanced(CMAKE_MAKE_PROGRAM)
  49. set(MSVC11 1)
  50. set(MSVC_VERSION 1700)