Skip to content


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

git-svn-id: 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
Original file line number Diff line number Diff line change
Expand Up @@ -369,6 +369,14 @@ int main(int argc, char *argv[])

// 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);

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

0 comments on commit 09d8277

Please sign in to comment.