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:
@@ -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
|
||||
|
Reference in New Issue
Block a user