]> git.tdb.fi Git - builder.git/blobdiff - plugins/base/baseplugin.cpp
Add visibility decorations to the library and plugins
[builder.git] / plugins / base / baseplugin.cpp
index b43c851fbdf63cb6bab239a8fa9f633b90cffa5e..0da610ce8def2237e7e490730c8e8a683ea90bb8 100644 (file)
@@ -4,8 +4,6 @@
 #include "basetools.h"
 #include "compilecommandsjson.h"
 #include "pkgconfigfile.h"
-#include "vcxprojectfile.h"
-#include "vssolutionfile.h"
 
 void BasePlugin::add_tools(Toolchain &toolchain, const Architecture &) const
 {
@@ -22,18 +20,20 @@ void BasePlugin::create_targets(SourcePackage &spkg) const
                builder.get_build_graph().get_target("install")->add_dependency(*builder.get_toolchain().get_tool("CP").create_target(*pc));
        }
 
-       if(native_arch.get_system()=="windows")
-       {
-               new VcxProjectFile(builder, spkg);
-               new VsSolutionFile(builder, spkg);
-       }
-
        new CompileCommandsJson(builder, spkg);
 }
 
 
+#if defined(_WIN32)
+#define BASETOOLS_API __declspec(dllexport)
+#elif defined(__GNUC__)
+#define BASETOOLS_API __attribute__((visibility("default")))
+#else
+#define BASETOOLS_API
+#endif
+
 extern "C"
-Plugin *create_plugin(Builder &builder)
+BASETOOLS_API Plugin *create_plugin(Builder &builder)
 {
        return new BasePlugin(builder);
 }