File tree Expand file tree Collapse file tree 2 files changed +5
-6
lines changed Expand file tree Collapse file tree 2 files changed +5
-6
lines changed Original file line number Diff line number Diff line change 24
24
#define QGIS_DATA_SUBDIR "${QGIS_DATA_SUBDIR}"
25
25
#define QGIS_LIBEXEC_SUBDIR "${QGIS_LIBEXEC_SUBDIR}"
26
26
#define QGIS_LIB_SUBDIR "${QGIS_LIB_SUBDIR}"
27
+ #define CMAKE_INSTALL_PREFIX "${CMAKE_INSTALL_PREFIX}"
27
28
28
29
#cmakedefine HAVE_POSTGRESQL
29
30
Original file line number Diff line number Diff line change @@ -34,6 +34,9 @@ map service syntax for SOAP/HTTP POST
34
34
#include < iostream>
35
35
#include < stdlib.h>
36
36
37
+ // for CMAKE_INSTALL_PREFIX
38
+ #include " qgsconfig.h"
39
+
37
40
38
41
#ifdef WIN32
39
42
#include < fcntl.h>
@@ -122,13 +125,8 @@ int main( int argc, char * argv[] )
122
125
123
126
QgsApplication qgsapp ( argc, argv, false );
124
127
125
- QString myQGisDir ( QGIS_LIB_DIR ); // defined in CmakeLists.txt
126
- myQGisDir += QDir::separator ();
127
- #ifdef Q_OS_LINUX
128
- myQGisDir += " /../" ;
129
- #endif
130
128
// init QGIS's paths - true means that all path will be inited from prefix
131
- QgsApplication::setPrefixPath ( myQGisDir , TRUE );
129
+ QgsApplication::setPrefixPath ( CMAKE_INSTALL_PREFIX , TRUE );
132
130
133
131
// Instantiate the plugin directory so that providers are loaded
134
132
QgsProviderRegistry::instance ( QgsApplication::pluginPath () );
You can’t perform that action at this time.
0 commit comments