mirror of
https://github.com/Open-Cascade-SAS/OCCT.git
synced 2026-09-09 22:28:13 +08:00
0032315: Configuration, CMake - fix building Draw Harness plugins as static libraries
DPLUGIN() macros no more defines exported function PLUGINFACTORY when building static libraries. DRAWEXE executable now pre-loads a set of plugins when building static libraries. dversion - added WebAssembly info.
This commit is contained in:
@@ -452,6 +452,12 @@ static Standard_Integer dversion(Draw_Interpretor& di, Standard_Integer, const c
|
||||
#else
|
||||
di << "Architecture: ARM 32-bit\n";
|
||||
#endif
|
||||
#elif defined(__EMSCRIPTEN__)
|
||||
#if defined(__LP64__)
|
||||
di << "Architecture: WASM 64-bit\n";
|
||||
#else
|
||||
di << "Architecture: WASM 32-bit\n";
|
||||
#endif
|
||||
#else
|
||||
di << "Architecture: unrecognized\n";
|
||||
#endif
|
||||
@@ -475,6 +481,8 @@ static Standard_Integer dversion(Draw_Interpretor& di, Standard_Integer, const c
|
||||
#elif defined(__FreeBSD__) || defined(__OpenBSD__) || defined(__NetBSD__) || defined(__DragonFly__)
|
||||
#include <sys/param.h>
|
||||
di << "OS: BSD (BSD = " << BSD << ")\n";
|
||||
#elif defined(__EMSCRIPTEN__)
|
||||
di << "OS: WebAssembly (Emscripten SDK " << __EMSCRIPTEN_major__ << "." << __EMSCRIPTEN_minor__ << "." << __EMSCRIPTEN_tiny__ << ")\n";
|
||||
#else
|
||||
di << "OS: unrecognized\n";
|
||||
#endif
|
||||
|
||||
@@ -16,10 +16,13 @@
|
||||
#ifndef _Draw_PluginMacro_HeaderFile
|
||||
#define _Draw_PluginMacro_HeaderFile
|
||||
|
||||
#ifdef OCCT_NO_PLUGINS
|
||||
#define DPLUGIN(name)
|
||||
#else
|
||||
#define DPLUGIN(name) \
|
||||
extern "C" {Standard_EXPORT void PLUGINFACTORY(Draw_Interpretor&);} \
|
||||
void PLUGINFACTORY(Draw_Interpretor& theDI) { \
|
||||
name::Factory(theDI);} \
|
||||
\
|
||||
extern "C" Standard_EXPORT void PLUGINFACTORY(Draw_Interpretor& theDI) { \
|
||||
name::Factory(theDI); \
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif
|
||||
|
||||
Reference in New Issue
Block a user