]> git.tdb.fi Git - builder.git/blob - plugins/msvc/msvcplugin.cpp
Move the VS project and solution generators to the MSVC plugin
[builder.git] / plugins / msvc / msvcplugin.cpp
1 #include <msp/builder/architecture.h>
2 #include <msp/builder/builder.h>
3 #include "microsofttools.h"
4 #include "msvcplugin.h"
5 #include "vcxprojectfile.h"
6 #include "vssolutionfile.h"
7
8 void MsvcPlugin::add_tools(Toolchain &toolchain, const Architecture &arch) const
9 {
10         if(arch.get_system()=="windows")
11                 toolchain.add_toolchain(new MicrosoftTools(builder, arch));
12 }
13
14 void MsvcPlugin::create_targets(SourcePackage &spkg) const
15 {
16         const Architecture &native_arch = builder.get_native_arch();
17
18         if(native_arch.get_system()=="windows")
19         {
20                 new VcxProjectFile(builder, spkg);
21                 new VsSolutionFile(builder, spkg);
22         }
23 }
24
25
26 extern "C"
27 Plugin *create_plugin(Builder &builder)
28 {
29         return new MsvcPlugin(builder);
30 }