Use devenv instead of msbuild for vs2010.

This commit is contained in:
Bill Hoffman 2011-06-21 15:58:11 -04:00
parent 08b109a87f
commit 8cd66dc0d2
1 changed files with 22 additions and 11 deletions

View File

@ -1,6 +1,6 @@
#=============================================================================
# Copyright 2009 Kitware, Inc.
# Copyright 2007-2009 Kitware, Inc.
#
# Distributed under the OSI-approved BSD License (the "License");
# see accompanying file Copyright.txt for details.
@ -12,17 +12,28 @@
# (To distribute this file outside of CMake, substitute the full
# License text for the above reference.)
# We use MSBuild as the build tool for VS 10
FIND_PROGRAM(CMAKE_MAKE_PROGRAM
NAMES MSBuild
HINTS
[HKEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft\\VisualStudio\\10.0\\Setup\\VS;ProductDir]
"$ENV{SYSTEMROOT}/Microsoft.NET/Framework/[HKEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft\\VisualStudio\\10.0;CLR Version]/"
"c:/WINDOWS/Microsoft.NET/Framework/[HKEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft\\VisualStudio\\10.0;CLR Version]/"
"$ENV{SYSTEMROOT}/Microsoft.NET/Framework/[HKEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft\\VCExpress\\10.0;CLR Version]/"
)
# VCExpress does not support cross compiling, which is necessary for Win CE
SET( _CMAKE_MAKE_PROGRAM_NAMES devenv)
IF(NOT CMAKE_CROSSCOMPILING)
SET( _CMAKE_MAKE_PROGRAM_NAMES ${_CMAKE_MAKE_PROGRAM_NAMES} VCExpress)
ENDIF(NOT CMAKE_CROSSCOMPILING)
FIND_PROGRAM(CMAKE_MAKE_PROGRAM
NAMES ${_CMAKE_MAKE_PROGRAM_NAMES}
HINTS
[HKEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft\\VisualStudio\\10.0\\Setup\\VS;EnvironmentDirectory]
[HKEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft\\VisualStudio\\10.0\\Setup;Dbghelp_path]
"$ENV{ProgramFiles}/Microsoft Visual Studio 10.0/Common7/IDE"
"$ENV{ProgramFiles}/Microsoft Visual Studio10.0/Common7/IDE"
"$ENV{ProgramFiles}/Microsoft Visual Studio 10/Common7/IDE"
"$ENV{ProgramFiles}/Microsoft Visual Studio10/Common7/IDE"
"$ENV{ProgramFiles} (x86)/Microsoft Visual Studio 10.0/Common7/IDE"
"$ENV{ProgramFiles} (x86)/Microsoft Visual Studio10.0/Common7/IDE"
"$ENV{ProgramFiles} (x86)/Microsoft Visual Studio 10/Common7/IDE"
"$ENV{ProgramFiles} (x86)/Microsoft Visual Studio10/Common7/IDE"
"/Program Files/Microsoft Visual Studio 10.0/Common7/IDE/"
"/Program Files/Microsoft Visual Studio 10/Common7/IDE/"
)
MARK_AS_ADVANCED(CMAKE_MAKE_PROGRAM)
SET(MSVC10 1)
SET(MSVC_VERSION 1600)