Use install prefix for the mapserver to locate vector provider libs

git-svn-id: http://svn.osgeo.org/qgis/trunk@14120 c8812cc2-4d05-0410-92ff-de0c093fc19c
This commit is contained in:
mhugent 2010-08-22 10:20:28 +00:00
parent 7d90e044fb
commit d79194eb0c
2 changed files with 5 additions and 6 deletions

View File

@ -24,6 +24,7 @@
#define QGIS_DATA_SUBDIR "${QGIS_DATA_SUBDIR}"
#define QGIS_LIBEXEC_SUBDIR "${QGIS_LIBEXEC_SUBDIR}"
#define QGIS_LIB_SUBDIR "${QGIS_LIB_SUBDIR}"
#define CMAKE_INSTALL_PREFIX "${CMAKE_INSTALL_PREFIX}"
#cmakedefine HAVE_POSTGRESQL

View File

@ -34,6 +34,9 @@ map service syntax for SOAP/HTTP POST
#include <iostream>
#include <stdlib.h>
//for CMAKE_INSTALL_PREFIX
#include "qgsconfig.h"
#ifdef WIN32
#include <fcntl.h>
@ -122,13 +125,8 @@ int main( int argc, char * argv[] )
QgsApplication qgsapp( argc, argv, false );
QString myQGisDir( QGIS_LIB_DIR ); //defined in CmakeLists.txt
myQGisDir += QDir::separator();
#ifdef Q_OS_LINUX
myQGisDir += "/../";
#endif
// init QGIS's paths - true means that all path will be inited from prefix
QgsApplication::setPrefixPath( myQGisDir, TRUE );
QgsApplication::setPrefixPath( CMAKE_INSTALL_PREFIX, TRUE );
// Instantiate the plugin directory so that providers are loaded
QgsProviderRegistry::instance( QgsApplication::pluginPath() );