Skip to content
Permalink
Browse files

Pass path to Qt plugins when Mac bundle is run from build directory

  • Loading branch information
dakcarto committed Nov 22, 2012
1 parent 6b3aed0 commit 2f3243d28a23ec1d6cede1caceae9c3219ac9a43
Showing with 7 additions and 1 deletion.
  1. +2 −0 cmake_templates/qgsconfig.h.in
  2. +5 −1 src/app/main.cpp
@@ -29,6 +29,8 @@
#define CMAKE_SOURCE_DIR "${CMAKE_SOURCE_DIR}"

#define QSCINTILLA_VERSION_STR "${QSCINTILLA_VERSION_STR}"
//used by Mac to find system Qt plugins when bundle is run from build directory
#define QTPLUGINSDIR "${QT_PLUGINS_DIR}"

#cmakedefine HAVE_POSTGRESQL

@@ -662,8 +662,12 @@ int main( int argc, char *argv[] )
QStringList myPathList;
QCoreApplication::setLibraryPaths( myPathList );
// Now set the paths inside the bundle
myPath += "/Contents/plugins";
myPath += "/Contents/Plugins";
QCoreApplication::addLibraryPath( myPath );
if ( QgsApplication::isRunningFromBuildDir() )
{
QCoreApplication::addLibraryPath( QTPLUGINSDIR );
}
//next two lines should not be needed, testing only
//QCoreApplication::addLibraryPath( myPath + "/imageformats" );
//QCoreApplication::addLibraryPath( myPath + "/sqldrivers" );

0 comments on commit 2f3243d

Please sign in to comment.
You can’t perform that action at this time.