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@14303 c8812cc2-4d05-0410-92ff-de0c093fc19c
  • Loading branch information
mhugent committed Sep 28, 2010
1 parent 235ac00 commit e5e80b086d484e0b3fdeb5566181480aea91d284
Showing with 13 additions and 2 deletions.
  1. +13 −2 src/mapserver/qgis_map_serv.cpp
@@ -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 e5e80b0

Please sign in to comment.