Skip to content
Permalink
Browse files
Possibility to set prefix path for mapserver by environment variable
git-svn-id: http://svn.osgeo.org/qgis/trunk/qgis@14303 c8812cc2-4d05-0410-92ff-de0c093fc19c
  • Loading branch information
mhugent committed Sep 28, 2010
1 parent e9698b2 commit 8f334bb
Showing 1 changed file with 13 additions and 2 deletions.
@@ -125,8 +125,19 @@ int main( int argc, char * argv[] )

QgsApplication qgsapp( argc, argv, false );

// init QGIS's paths - true means that all path will be inited from prefix
QgsApplication::setPrefixPath( CMAKE_INSTALL_PREFIX, TRUE );
//Default prefix path may be altered by environment variable
char* prefixPath = getenv( "QGIS_PREFIX_PATH" );
if ( prefixPath )
{
QgsApplication::setPrefixPath( prefixPath, TRUE );
}
else
{
// init QGIS's paths - true means that all path will be inited from prefix
QgsApplication::setPrefixPath( CMAKE_INSTALL_PREFIX, TRUE );
}



// Instantiate the plugin directory so that providers are loaded
QgsProviderRegistry::instance( QgsApplication::pluginPath() );

0 comments on commit 8f334bb

Please sign in to comment.