Skip to content
Permalink
Browse files
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
  • Loading branch information
mhugent committed Aug 22, 2010
1 parent 7d90e04 commit d79194eb0cd9bb30ce8824fa749e4f92dfc8614c
Showing with 5 additions and 6 deletions.
  1. +1 −0 cmake_templates/qgsconfig.h.in
  2. +4 −6 src/mapserver/qgis_map_serv.cpp
@@ -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

@@ -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() );

0 comments on commit d79194e

Please sign in to comment.