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:
kgv
2021-03-20 00:31:01 +03:00
committed by bugmaster
parent d0d9e9375f
commit a34bddcfd6
16 changed files with 560 additions and 357 deletions
+8
View File
@@ -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
+7 -4
View File
@@ -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