Skip to content

Commit d79194e

Browse files
author
mhugent
committedAug 22, 2010
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
1 parent 7d90e04 commit d79194e

File tree

2 files changed

+5
-6
lines changed

2 files changed

+5
-6
lines changed
 

‎cmake_templates/qgsconfig.h.in

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@
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

‎src/mapserver/qgis_map_serv.cpp

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff 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() );

0 commit comments

Comments
 (0)
Please sign in to comment.