]> git.tdb.fi Git - builder.git/blob - msvcplugin.cpp
9ebf24a5f517809894bdfc81a09c038983fbc1c1
[builder.git] / 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 }