diff options
author | Jussi Pakkanen <jpakkane@gmail.com> | 2014-03-19 21:06:39 +0200 |
---|---|---|
committer | Jussi Pakkanen <jpakkane@gmail.com> | 2014-03-19 21:06:39 +0200 |
commit | 9c956b3b08c61e626a7ac759b2d93970c43bdf19 (patch) | |
tree | 567af70494f544367d18d6b2d2d085873d0a15a9 /backends.py | |
parent | f692555a275cd56546f5f47f4341f996c5b0cba1 (diff) | |
download | meson-9c956b3b08c61e626a7ac759b2d93970c43bdf19.zip meson-9c956b3b08c61e626a7ac759b2d93970c43bdf19.tar.gz meson-9c956b3b08c61e626a7ac759b2d93970c43bdf19.tar.bz2 |
Can build all three target types.
Diffstat (limited to 'backends.py')
-rw-r--r-- | backends.py | 13 |
1 files changed, 11 insertions, 2 deletions
diff --git a/backends.py b/backends.py index f5bad2b..3a13390 100644 --- a/backends.py +++ b/backends.py @@ -1283,7 +1283,16 @@ class Vs2010Backend(Backend): platform = "Win32" project_name = target.name target_name = target.name - subsystem = 'console' + subsystem = 'Windows' + if isinstance(target, build.Executable): + conftype = 'Application' + subsystem = 'Console' + elif isinstance(target, build.StaticLibrary): + conftype = 'StaticLibrary' + elif isinstance(target, build.SharedLibrary): + conftype = 'SharedLibrary' + else: + raise MesonException('Unknown target type for %s' % target_name) root = ET.Element('Project', {'DefaultTargets' : "Build", 'ToolsVersion' : '4.0', 'xmlns' : 'http://schemas.microsoft.com/developer/msbuild/2003'}) @@ -1306,7 +1315,7 @@ class Vs2010Backend(Backend): pname.text = project_name ET.SubElement(root, 'Import', Project='$(VCTargetsPath)\Microsoft.Cpp.Default.props') type_config = ET.SubElement(root, 'PropertyGroup', Label='Configuration') - ET.SubElement(type_config, 'ConfigurationType').text = 'Application' + ET.SubElement(type_config, 'ConfigurationType').text = conftype ET.SubElement(type_config, 'CharacterSet').text = 'MultiByte' ET.SubElement(type_config, 'WholeProgramOptimization').text = 'false' ET.SubElement(type_config, 'UseDebugLibraries').text = 'true' |