summaryrefslogtreecommitdiff
path: root/modules/VS2022ProjectCreator.pm
diff options
context:
space:
mode:
authorAdam Mitz <mitza@objectcomputing.com>2021-11-08 11:18:42 -0600
committerAdam Mitz <mitza@objectcomputing.com>2021-11-08 11:19:47 -0600
commitbdb7c35e6d8ae3451123ed1694a58a744c48e957 (patch)
tree9a5e83c83c0f75e3d6f225fea31653c147858b03 /modules/VS2022ProjectCreator.pm
parentcdf4e7e044a258dbe9da7ee359f9ddf885d9c755 (diff)
downloadMPC-bdb7c35e6d8ae3451123ed1694a58a744c48e957.tar.gz
Generate Visual Studio 2022 projects and solutions
Diffstat (limited to 'modules/VS2022ProjectCreator.pm')
-rw-r--r--modules/VS2022ProjectCreator.pm56
1 files changed, 56 insertions, 0 deletions
diff --git a/modules/VS2022ProjectCreator.pm b/modules/VS2022ProjectCreator.pm
new file mode 100644
index 00000000..2f9ce191
--- /dev/null
+++ b/modules/VS2022ProjectCreator.pm
@@ -0,0 +1,56 @@
+package VS2022ProjectCreator;
+
+# ************************************************************
+# Description : vs2022 (Visual Studio 2022) Project Creator
+# ************************************************************
+
+# ************************************************************
+# Pragmas
+# ************************************************************
+
+use strict;
+
+use VC12ProjectCreator;
+
+use vars qw(@ISA);
+@ISA = qw(VC12ProjectCreator);
+
+## NOTE: We call the constant as a function to support Perl 5.6.
+my %info = (Creator::cplusplus() => {'ext' => '.vcxproj',
+ 'dllexe' => 'vs2022exe',
+ 'libexe' => 'vs2022libexe',
+ 'dll' => 'vs2022dll',
+ 'lib' => 'vs2022lib',
+ 'template' => [ 'vc10', 'vc10filters' ],
+ },
+ );
+
+my %config = ('vcversion' => '16.00',
+ 'toolsversion' => '16.0',
+ );
+
+# ************************************************************
+# Subroutine Section
+# ************************************************************
+
+sub get_info_hash {
+ my($self, $key) = @_;
+
+ ## If we have the setting in our information map, then use it.
+ return $info{$key} if (defined $info{$key});
+
+ ## Otherwise, see if our parent type can take care of it.
+ return $self->SUPER::get_info_hash($key);
+}
+
+sub get_configurable {
+ my($self, $name) = @_;
+
+ ## If we have the setting in our config map, then use it.
+ return $config{$name} if (defined $config{$name});
+
+ ## Otherwise, see if our parent type can take care of it.
+ return $self->SUPER::get_configurable($name);
+}
+
+1;