OPTION(SALOME_BUILD_GUI "Enable GUI" ON)
OPTION(SALOME_SMESH_USE_CGNS "Enable import/export to CGNS format" OFF)
OPTION(SALOME_SMESH_USE_TBB "Enable parallel computation" OFF)
+OPTION(SALOME_SMESH_DYNLOAD_LOCAL "Load plug-ins' symbols locally (Linux only)" OFF)
+
+IF(SALOME_SMESH_DYNLOAD_LOCAL)
+ ADD_DEFINITIONS(-DDYNLOAD_LOCAL)
+ENDIF(SALOME_SMESH_DYNLOAD_LOCAL)
#On Linux use Fortran to compile MEFISTO2D
IF(NOT WIN32)
ADD_DEFINITIONS(-DENABLE_MEFISTO)
ENDIF(NOT WIN32)
-MARK_AS_ADVANCED(SALOME_BUILD_GUI SALOME_SMESH_USE_CGNS SALOME_SMESH_USE_TBB)
+MARK_AS_ADVANCED(SALOME_BUILD_GUI SALOME_SMESH_USE_CGNS SALOME_SMESH_USE_TBB SALOME_SMESH_DYNLOAD_LOCAL)
# Prerequisites
# =============
#endif
#ifdef WIN32
-#define LibHandle HMODULE
-#define LoadLib( name ) LoadLibrary( name )
-#define GetProc GetProcAddress
-#define UnLoadLib( handle ) FreeLibrary( handle );
-#else
-#define LibHandle void*
-#define LoadLib( name ) dlopen( name, RTLD_LAZY | RTLD_GLOBAL )
-#define GetProc dlsym
-#define UnLoadLib( handle ) dlclose( handle );
-#endif
+ #define LibHandle HMODULE
+ #define LoadLib( name ) LoadLibrary( name )
+ #define GetProc GetProcAddress
+ #define UnLoadLib( handle ) FreeLibrary( handle );
+#else // WIN32
+ #define LibHandle void*
+ #ifdef DYNLOAD_LOCAL
+ #define LoadLib( name ) dlopen( name, RTLD_LAZY | RTLD_LOCAL )
+ #else // DYNLOAD_LOCAL
+ #define LoadLib( name ) dlopen( name, RTLD_LAZY | RTLD_GLOBAL )
+ #endif // DYNLOAD_LOCAL
+ #define GetProc dlsym
+ #define UnLoadLib( handle ) dlclose( handle );
+#endif // WIN32
#ifdef _DEBUG_
static int MYDEBUG = 0;
#define LoadLib( name ) LoadLibrary( name )
#define GetProc GetProcAddress
#define UnLoadLib( handle ) FreeLibrary( handle );
-#else
+#else // WIN32
#define LibHandle void*
- #define LoadLib( name ) dlopen( name, RTLD_LAZY | RTLD_GLOBAL )
+ #ifdef DYNLOAD_LOCAL
+ #define LoadLib( name ) dlopen( name, RTLD_LAZY | RTLD_LOCAL )
+ #else // DYNLOAD_LOCAL
+ #define LoadLib( name ) dlopen( name, RTLD_LAZY | RTLD_GLOBAL )
+ #endif // DYNLOAD_LOCAL
#define GetProc dlsym
#define UnLoadLib( handle ) dlclose( handle );
-#endif
+#endif // WIN32
#include "SMESH_Gen_i.hxx"
#include "SMESH_version.h"