Skip to content

Commit

Permalink
Possibility to set prefix path for mapserver by environment variable
Browse files Browse the repository at this point in the history
git-svn-id: http://svn.osgeo.org/qgis/trunk@14303 c8812cc2-4d05-0410-92ff-de0c093fc19c
  • Loading branch information
mhugent committed Sep 28, 2010
1 parent 235ac00 commit e5e80b0
Showing 1 changed file with 13 additions and 2 deletions.
15 changes: 13 additions & 2 deletions src/mapserver/qgis_map_serv.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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() );
Expand Down

0 comments on commit e5e80b0

Please sign in to comment.