Add support for VS2019. Closes #4640.

pull/3582/merge
Jussi Pakkanen 6 years ago
parent 02ff9829c4
commit 04710b087a
  1. 3
      mesonbuild/backend/backends.py
  2. 4
      mesonbuild/backend/vs2010backend.py
  3. 2
      mesonbuild/coredata.py

@ -141,6 +141,9 @@ def get_backend_from_name(backend, build):
elif backend == 'vs2017':
from . import vs2017backend
return vs2017backend.Vs2017Backend(build)
elif backend == 'vs2019':
from . import vs2019backend
return vs2019backend.Vs2019Backend(build)
elif backend == 'xcode':
from . import xcodebackend
return xcodebackend.XCodeBackend(build)

@ -46,6 +46,10 @@ def autodetect_vs_version(build):
'Visual Studio\\2017' in vs_install_dir:
from mesonbuild.backend.vs2017backend import Vs2017Backend
return Vs2017Backend(build)
if vs_version == '16.0' or 'Visual Studio 19' in vs_install_dir or \
'Visual Studio\\2019' in vs_install_dir:
from mesonbuild.backend.vs2019backend import Vs2019Backend
return Vs2019Backend(build)
if 'Visual Studio 10.0' in vs_install_dir:
return Vs2010Backend(build)
raise MesonException('Could not detect Visual Studio using VisualStudioVersion: {!r} or VSINSTALLDIR: {!r}!\n'

@ -29,7 +29,7 @@ import configparser
from typing import Optional, Any, TypeVar, Generic, Type
version = '0.50.999'
backendlist = ['ninja', 'vs', 'vs2010', 'vs2015', 'vs2017', 'xcode']
backendlist = ['ninja', 'vs', 'vs2010', 'vs2015', 'vs2017', 'vs2019', 'xcode']
default_yielding = False

Loading…
Cancel
Save