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 2f3243d
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
@@ -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.