]> git.tdb.fi Git - builder.git/blob - plugins/datafile/datafileplugin.cpp
Add visibility decorations to the library and plugins
[builder.git] / plugins / datafile / datafileplugin.cpp
1 #include <msp/builder/builder.h>
2 #include "datafileplugin.h"
3 #include "datapackcomponent.h"
4 #include "datatool.h"
5
6 DataFilePlugin::DataFilePlugin(Builder &b):
7         Plugin(b)
8 {
9         builder.get_component_registry().register_type<DataPackComponent>("datapack");
10 }
11
12 void DataFilePlugin::add_tools(Toolchain &toolchain, const Architecture &) const
13 {
14         toolchain.add_tool(new DataTool(builder));
15 }
16
17
18 #if defined(_WIN32)
19 #define DATATOOLS_API __declspec(dllexport)
20 #elif defined(__GNUC__)
21 #define DATATOOLS_API __attribute__((visibility("default")))
22 #else
23 #define DATATOOLS_API
24 #endif
25
26 extern "C"
27 DATATOOLS_API Plugin *create_plugin(Builder &builder)
28 {
29         return new DataFilePlugin(builder);
30 }