mirror of
https://github.com/qgis/QGIS.git
synced 2025-04-16 00:03:12 -04:00
Pass path to Qt plugins when Mac bundle is run from build directory
This commit is contained in:
parent
6b3aed014f
commit
2f3243d28a
@ -29,6 +29,8 @@
|
|||||||
#define CMAKE_SOURCE_DIR "${CMAKE_SOURCE_DIR}"
|
#define CMAKE_SOURCE_DIR "${CMAKE_SOURCE_DIR}"
|
||||||
|
|
||||||
#define QSCINTILLA_VERSION_STR "${QSCINTILLA_VERSION_STR}"
|
#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
|
#cmakedefine HAVE_POSTGRESQL
|
||||||
|
|
||||||
|
@ -662,8 +662,12 @@ int main( int argc, char *argv[] )
|
|||||||
QStringList myPathList;
|
QStringList myPathList;
|
||||||
QCoreApplication::setLibraryPaths( myPathList );
|
QCoreApplication::setLibraryPaths( myPathList );
|
||||||
// Now set the paths inside the bundle
|
// Now set the paths inside the bundle
|
||||||
myPath += "/Contents/plugins";
|
myPath += "/Contents/Plugins";
|
||||||
QCoreApplication::addLibraryPath( myPath );
|
QCoreApplication::addLibraryPath( myPath );
|
||||||
|
if ( QgsApplication::isRunningFromBuildDir() )
|
||||||
|
{
|
||||||
|
QCoreApplication::addLibraryPath( QTPLUGINSDIR );
|
||||||
|
}
|
||||||
//next two lines should not be needed, testing only
|
//next two lines should not be needed, testing only
|
||||||
//QCoreApplication::addLibraryPath( myPath + "/imageformats" );
|
//QCoreApplication::addLibraryPath( myPath + "/imageformats" );
|
||||||
//QCoreApplication::addLibraryPath( myPath + "/sqldrivers" );
|
//QCoreApplication::addLibraryPath( myPath + "/sqldrivers" );
|
||||||
|
Loading…
x
Reference in New Issue
Block a user