[Libreoffice-commits] core.git: configure.ac

Norbert Thiebaud nthiebaud at gmail.com
Sat Oct 18 11:52:53 PDT 2014


 configure.ac |   10 ++++++++++
 1 file changed, 10 insertions(+)

New commits:
commit 76397a8b53d2043dd7a6dc94e521bd7958148fae
Author: Norbert Thiebaud <nthiebaud at gmail.com>
Date:   Sat Oct 18 13:52:16 2014 -0500

    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

diff --git a/configure.ac b/configure.ac
index aa9112f..25ff959 100644
--- a/configure.ac
+++ b/configure.ac
@@ -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"


More information about the Libreoffice-commits mailing list