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 2424#define QGIS_DATA_SUBDIR "${QGIS_DATA_SUBDIR}"
2525#define QGIS_LIBEXEC_SUBDIR "${QGIS_LIBEXEC_SUBDIR}"
2626#define QGIS_LIB_SUBDIR "${QGIS_LIB_SUBDIR}"
27+ #define CMAKE_INSTALL_PREFIX "${CMAKE_INSTALL_PREFIX}"
2728
2829#cmakedefine HAVE_POSTGRESQL
2930
Original file line number Diff line number Diff line change @@ -34,6 +34,9 @@ map service syntax for SOAP/HTTP POST
3434#include < iostream>
3535#include < stdlib.h>
3636
37+ // for CMAKE_INSTALL_PREFIX
38+ #include " qgsconfig.h"
39+
3740
3841#ifdef WIN32
3942#include < fcntl.h>
@@ -122,13 +125,8 @@ int main( int argc, char * argv[] )
122125
123126 QgsApplication qgsapp ( argc, argv, false );
124127
125- QString myQGisDir ( QGIS_LIB_DIR ); // defined in CmakeLists.txt
126- myQGisDir += QDir::separator ();
127- #ifdef Q_OS_LINUX
128- myQGisDir += " /../" ;
129- #endif
130128 // 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 );
132130
133131 // Instantiate the plugin directory so that providers are loaded
134132 QgsProviderRegistry::instance ( QgsApplication::pluginPath () );
You can’t perform that action at this time.
0 commit comments