Kaydet (Commit) 76397a8b authored tarafından Norbert Thiebaud's avatar Norbert Thiebaud

windows: try to locate a good MSBuild.exe based on the version of VS

lcms2 for instance call MSBuild.exe, naked. it relies on what is found
in the PATH, but apparently MSBuild.exe can be found in many places
including for instance the .NET Framework.
This was causing failure with a VS2013

This patch inspect the registry to see if there is a MSBuild of the
same level than VS2013 and use that information to adjust the PATH
so that we invoke the right version.

Note: starting VS2013, Microsoft is numbering the version of MSBuild
with the same version number than VS itself.. so with VS2013 the version
of MSBuild is 12.0 (vs 4.0 before that)

Change-Id: I04c614116d1d365a10c9b9e0e8ce9571d770c065
üst b77ea749
......@@ -3430,6 +3430,7 @@ find_msvc()
}
SHOWINCLUDES_PREFIX=
MSBUILD_PATH=
if test "$_os" = "WINNT"; then
if test "$WITH_MINGW" != "yes"; then
AC_MSG_CHECKING([Visual C++])
......@@ -3468,6 +3469,12 @@ if test "$_os" = "WINNT"; then
AC_MSG_RESULT([No])
fi
# Find the proper version of MSBuild.exe to use based on the VS version
reg_get_value_32 HKEY_LOCAL_MACHINE/SOFTWARE/Microsoft/MSBuild/$vcnumwithdot/MSBuildOverrideTasksPath
if test -n "$regvalue" ; then
MSBUILD_PATH="$regvalue"
fi
dnl ===========================================================
dnl Check for the corresponding mspdb*.dll
dnl ===========================================================
......@@ -12750,6 +12757,9 @@ else
pathmunge "$MIDL_PATH" "before"
pathmunge "$AL_PATH" "before"
pathmunge "$MSPDB_PATH" "before"
if test -n "$MSBUILD_PATH" ; then
pathmunge "$MSBUILD_PATH" "before"
fi
if test "$BITNESS_OVERRIDE" = 64; then
pathmunge "$COMPATH/bin/amd64" "before"
pathmunge "$WINDOWS_SDK_HOME/bin/x64" "before"
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment