{
if ( !myGUIMap.contains( libraryName ) ) {
// try to load library if it is not loaded yet
-#ifndef WIN32
- QString dirs = getenv( "LD_LIBRARY_PATH" );
- QString sep = ":";
-#else
+#if defined(WIN32)
QString dirs = getenv( "PATH" );
+#elif defined(__APPLE__)
+ QString dirs = getenv( "DYLD_LIBRARY_PATH" );
+#else
+ QString dirs = getenv( "LD_LIBRARY_PATH" );
+#endif
+#if defined(WIN32)
QString sep = ";";
+#else
+ QString sep = ":";
#endif
+
if ( !dirs.isEmpty() ) {
QStringList dirList = dirs.split(sep, QString::SkipEmptyParts ); // skip empty entries
QListIterator<QString> it( dirList ); it.toBack();
{
if ( !myGUIMap.contains( libraryName ) ) {
// try to load library if it is not loaded yet
-#ifndef WIN32
- QString dirs = getenv( "LD_LIBRARY_PATH" );
- QString sep = ":";
-#else
+
+#if defined(WIN32)
QString dirs = getenv( "PATH" );
+#elif defined(__APPLE__)
+ QString dirs = getenv( "DYLD_LIBRARY_PATH" );
+#else
+ QString dirs = getenv( "LD_LIBRARY_PATH" );
+#endif
+#if defined(WIN32)
QString sep = ";";
+#else
+ QString sep = ":";
#endif
+
if ( !dirs.isEmpty() ) {
QStringList dirList = dirs.split(sep, QString::SkipEmptyParts ); // skip empty entries
QListIterator<QString> it( dirList ); it.toBack();
GEOMPluginGUI* library = 0;
if ( !libName.isEmpty() ) {
-#ifndef WIN32
- libName = QString( "lib" ) + libName + ".so";
-#else
+#if defined(WIN32)
libName = libName + ".dll";
+#elif defined(__APPLE__)
+ libName = QString( "lib" ) + libName + ".dylib";
+#else
+ libName = QString( "lib" ) + libName + ".so";
#endif
library = getPluginLibrary( libName );
}
GEOMGUI* library = 0;
if ( !libName.isEmpty() ) {
-#ifndef WIN32
- libName = QString( "lib" ) + libName + ".so";
-#else
+#if defined(WIN32)
libName = libName + ".dll";
+#elif defined(__APPLE__)
+ libName = QString( "lib" ) + libName + ".dylib";
+#else
+ libName = QString( "lib" ) + libName + ".so";
#endif
library = getLibrary( libName );
}
void GEOM_Gen_i::LoadPlugin(const std::string& theLibName)
{
std::string aPlatformLibName;
-#ifdef WIN32
- aPlatformLibName = theLibName;
- aPlatformLibName += ".dll" ;
-#else
+#if !defined(WIN32)
aPlatformLibName = "lib";
+#endif
aPlatformLibName += theLibName;
+#if defined(WIN32)
+ aPlatformLibName += ".dll" ;
+#elif defined(__APPLE__)
+ aPlatformLibName += ".dylib";
+#else
aPlatformLibName += ".so";
#endif