File tree Expand file tree Collapse file tree 4 files changed +9
-14
lines changed Expand file tree Collapse file tree 4 files changed +9
-14
lines changed Original file line number Diff line number Diff line change @@ -450,10 +450,6 @@ ELSE (WIN32)
450
450
SET (CMAKE_INSTALL_NAME_DIR ${CMAKE_BINARY_DIR} /output/lib )
451
451
IF (WITH_GLOBE )
452
452
SET (OSG_PLUGINS_PATH "" CACHE PATH "Path to OSG plugins for bundling" )
453
- IF (QGIS_MACAPP_BUNDLE GREATER 0 )
454
- # ensure OSG plugins bundled path will be used by globe plugin
455
- SET (HAVE_MACAPP_BUNDLED_OSG 1 )
456
- ENDIF (QGIS_MACAPP_BUNDLE GREATER 0 )
457
453
ENDIF (WITH_GLOBE )
458
454
# recent cmakes force SDKs, recent SDKs don't have user symlinks
459
455
# need to find non-system frameworks
Original file line number Diff line number Diff line change 29
29
#define CMAKE_SOURCE_DIR "${CMAKE_SOURCE_DIR}"
30
30
31
31
#define QSCINTILLA_VERSION_STR "${QSCINTILLA_VERSION_STR}"
32
- //used by Mac to find system Qt plugins when bundle is run from build directory
33
- #define QTPLUGINSDIR "${QT_PLUGINS_DIR}"
34
32
35
- //used by Mac to find system Open Scene Graph plugins when bundle is run from build directory
33
+ #if defined( __APPLE__ )
34
+ //used by Mac to find system or bundle resources relative to amount of bundling
35
+ #define QGIS_MACAPP_BUNDLE ${QGIS_MACAPP_BUNDLE}
36
+ #endif
37
+
38
+ #define QT_PLUGINS_DIR "${QT_PLUGINS_DIR}"
36
39
#define OSG_PLUGINS_PATH "${OSG_PLUGINS_PATH}"
37
40
38
41
#cmakedefine USING_NMAKE
53
56
54
57
#cmakedefine MAPSERVER_SKIP_ECW
55
58
56
- #cmakedefine HAVE_MACAPP_BUNDLED_OSG
57
-
58
59
#endif
59
60
Original file line number Diff line number Diff line change @@ -858,9 +858,9 @@ int main( int argc, char *argv[] )
858
858
// Now set the paths inside the bundle
859
859
myPath += " /Contents/Plugins" ;
860
860
QCoreApplication::addLibraryPath ( myPath );
861
- if ( QgsApplication::isRunningFromBuildDir () )
861
+ if ( QgsApplication::isRunningFromBuildDir () || QGIS_MACAPP_BUNDLE == 0 )
862
862
{
863
- QCoreApplication::addLibraryPath ( QTPLUGINSDIR );
863
+ QCoreApplication::addLibraryPath ( QT_PLUGINS_DIR );
864
864
}
865
865
// next two lines should not be needed, testing only
866
866
#if 0
Original file line number Diff line number Diff line change @@ -111,13 +111,11 @@ GlobePlugin::GlobePlugin( QgisInterface* theQgisInterface )
111
111
{
112
112
// OSG_PLUGINS_PATH value set by CMake option
113
113
QString ogsPlugins ( OSG_PLUGINS_PATH );
114
- #ifdef HAVE_MACAPP_BUNDLED_OSG
115
- if ( !QgsApplication::isRunningFromBuildDir () )
114
+ if ( QGIS_MACAPP_BUNDLE > 0 && !QgsApplication::isRunningFromBuildDir () )
116
115
{
117
116
// add internal osg plugin path if bundled osg
118
117
ogsPlugins = QgsApplication::pluginPath () + " /../osgPlugins" ;
119
118
}
120
- #endif
121
119
if ( QFile::exists ( ogsPlugins ) )
122
120
{
123
121
osgDB::Registry::instance ()->setLibraryFilePathList ( QDir::cleanPath ( ogsPlugins ).toStdString () );
You can’t perform that action at this time.
0 commit comments