File tree Expand file tree Collapse file tree 1 file changed +13
-2
lines changed
Expand file tree Collapse file tree 1 file changed +13
-2
lines changed Original file line number Diff line number Diff line change @@ -125,8 +125,19 @@ int main( int argc, char * argv[] )
125125
126126 QgsApplication qgsapp ( argc, argv, false );
127127
128- // init QGIS's paths - true means that all path will be inited from prefix
129- QgsApplication::setPrefixPath ( CMAKE_INSTALL_PREFIX, TRUE );
128+ // Default prefix path may be altered by environment variable
129+ char * prefixPath = getenv ( " QGIS_PREFIX_PATH" );
130+ if ( prefixPath )
131+ {
132+ QgsApplication::setPrefixPath ( prefixPath, TRUE );
133+ }
134+ else
135+ {
136+ // init QGIS's paths - true means that all path will be inited from prefix
137+ QgsApplication::setPrefixPath ( CMAKE_INSTALL_PREFIX, TRUE );
138+ }
139+
140+
130141
131142 // Instantiate the plugin directory so that providers are loaded
132143 QgsProviderRegistry::instance ( QgsApplication::pluginPath () );
You can’t perform that action at this time.
0 commit comments