]> git.tdb.fi Git - libs/game.git/blob - tools/builder-plugin/gameplugin.cpp
Create a builder plugin for the setup generator tool
[libs/game.git] / tools / builder-plugin / gameplugin.cpp
1 #include "gameplugin.h"
2 #include <msp/builder/toolchain.h>
3 #include "gametools.h"
4
5 void GamePlugin::add_tools(Toolchain &toolchain, const Architecture &) const
6 {
7         toolchain.add_toolchain(new GameTools(builder));
8 }
9
10
11 #if defined(_WIN32)
12 #define GAMETOOLS_API __declspec(dllexport)
13 #elif defined(__GNUC__)
14 #define GAMETOOLS_API __attribute__((visibility("default")))
15 #else
16 #define GAMETOOLS_API
17 #endif
18
19 extern "C"
20 GAMETOOLS_API Plugin *create_plugin(Builder &builder)
21 {
22         return new GamePlugin(builder);
23 }