1
0
mirror of https://git.dev.opencascade.org/repos/occt.git synced 2025-08-09 13:22:24 +03:00

0027401: Configuration, Plugin - allow using statically linked plugins

CMake script now defines OCCT_NO_PLUGINS for static builds,
so that linking with OCAF plugins does not lead to duplicated symbols.
This commit is contained in:
kgv
2016-04-20 10:45:32 +03:00
committed by abv
parent 6fe96f8416
commit d52651755e
4 changed files with 53 additions and 90 deletions

View File

@@ -17,11 +17,14 @@
#ifndef _Plugin_Macro_HeaderFile
#define _Plugin_Macro_HeaderFile
#ifdef OCCT_NO_PLUGINS
#define PLUGIN(name)
#else
//! Macro implementing C-style interface function to get factory object from the dynamically loaded library
#define PLUGIN(name) \
extern "C" Standard_EXPORT Standard_Transient* PLUGINFACTORY(const Standard_GUID& aGUID) { \
return const_cast<Standard_Transient*>(name::Factory(aGUID).get()); \
}
#endif
#endif