File tree 1 file changed +13
-2
lines changed
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[] )
125
125
126
126
QgsApplication qgsapp ( argc, argv, false );
127
127
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
+
130
141
131
142
// Instantiate the plugin directory so that providers are loaded
132
143
QgsProviderRegistry::instance ( QgsApplication::pluginPath () );
You can’t perform that action at this time.
0 commit comments