Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
For Mac OS X, if the GDAL plugins are bundled with the application, s…
…et an environment variable to search the bundle before searching the GDAL prefix path hardcoded into the library.

git-svn-id: http://svn.osgeo.org/qgis/trunk@5580 c8812cc2-4d05-0410-92ff-de0c093fc19c
  • Loading branch information
telwertowski committed Jul 10, 2006
1 parent f8025fd commit 09d8277
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions src/gui/main.cpp
Expand Up @@ -369,6 +369,14 @@ int main(int argc, char *argv[])
{
QCoreApplication::setLibraryPaths(QStringList(QCoreApplication::applicationDirPath()));
}

// If the GDAL plugins are bundled with the application and GDAL_DRIVER_PATH
// is not already defined, use the GDAL plugins in the application bundle.
QString gdalPlugins(QCoreApplication::applicationDirPath().append("/lib/gdalplugins"));
if (QFile::exists(gdalPlugins) && !getenv("GDAL_DRIVER_PATH"))
{
setenv("GDAL_DRIVER_PATH", gdalPlugins, 1);
}
#endif

// Check to see if qgis was started from the source directory.
Expand Down

0 comments on commit 09d8277

Please sign in to comment.