Skip to content
Permalink
Browse files

[globe] Fix Mac dependencies so plugin can run from app bundle

  • Loading branch information
dakcarto committed Sep 12, 2013
1 parent e7ae5d2 commit 546b8d23972c60851195cf7eff209949f5ba1fec
Showing with 17 additions and 6 deletions.
  1. +5 −1 CMakeLists.txt
  2. +2 −0 cmake_templates/qgsconfig.h.in
  3. +1 −1 mac/cmake/1osg.cmake.in
  4. +4 −0 mac/cmake/1qt.cmake.in
  5. +5 −4 src/plugins/globe/globe_plugin.cpp
@@ -440,7 +440,11 @@ ELSE (WIN32)
# changed later to reference in-app resources upon install
SET (CMAKE_INSTALL_NAME_DIR ${CMAKE_BINARY_DIR}/output/lib)
IF (WITH_GLOBE)
SET (OSG_PLUGINS_PATH "" CACHE PATH "Path to OSG plugins for bundling")
SET (OSG_PLUGINS_PATH "" CACHE PATH "Path to OSG plugins for bundling")
IF (QGIS_MACAPP_BUNDLE GREATER 0)
# ensure OSG plugins bundled path will be used by globe plugin
SET (HAVE_MACAPP_BUNDLED_OSG 1)
ENDIF (QGIS_MACAPP_BUNDLE GREATER 0)
ENDIF (WITH_GLOBE)
# recent cmakes force SDKs, recent SDKs don't have user symlinks
# need to find non-system frameworks
@@ -50,5 +50,7 @@

#cmakedefine MAPSERVER_SKIP_ECW

#cmakedefine HAVE_MACAPP_BUNDLED_OSG

#endif

@@ -15,7 +15,7 @@ SET (OSG_PLUGINS_PATH "@OSG_PLUGINS_PATH@")

# list of osg frameworks to bundle

SET (OSGLIST OpenThreads osg osgDB osgGA osgViewer osgEarth osgEarthAnnotation osgEarthFeatures osgEarthSymbology osgEarthUtil osgFX osgManipulator osgShadow osgSim osgTerrain osgText osgUtil osgWidget)
SET (OSGLIST OpenThreads osg osgAnimation osgDB osgGA osgViewer osgEarth osgEarthAnnotation osgEarthFeatures osgEarthSymbology osgEarthUtil osgFX osgManipulator osgParticle osgPresentation osgShadow osgSim osgTerrain osgText osgUtil osgVolume osgWidget)
IF (@HAVE_OSGEARTHQT@)
SET (OSGLIST ${OSGLIST} osgQt osgEarthQt)
ENDIF (@HAVE_OSGEARTHQT@)
@@ -280,6 +280,10 @@ FOREACH (QFW ${QTLISTQG})
IF (@OSX_HAVE_LOADERPATH@)
SET (QFW_CHG_TO "${ATLOADER}/@QGIS_PLUGIN_SUBDIR_REV@/${QGIS_FW_SUBDIR}/${LIBPOST}")
ENDIF ()
# osg qfont plugin
IF (@HAVE_OSGEARTHQT@)
INSTALLNAMETOOL_CHANGE ("${QFW_CHG}" "${QFW_CHG_TO}" "${QPLUGDIR}/../osgPlugins/osgdb_qfont.so")
ENDIF (@HAVE_OSGEARTHQT@)
FOREACH (QI qgif;qico;qjpeg;qsvg;qtiff)
INSTALLNAMETOOL_CHANGE ("${QFW_CHG}" "${QFW_CHG_TO}" "${QPLUGDIR}/../imageformats/lib${QI}.dylib")
ENDFOREACH (QI)
@@ -96,10 +96,11 @@ GlobePlugin::GlobePlugin( QgisInterface* theQgisInterface )
setParent( theQgisInterface->mainWindow() );

// add internal osg plugin path if bundled osg on OS X
#ifdef QGIS_MACAPP_BUNDLE
#if QGIS_MACAPP_BUNDLE > 0
setLibraryFilePathList( QgsApplication::prefixPath() + "/QGIS_PLUGIN_SUBDIR/../osgPlugins" );
#endif
#ifdef HAVE_MACAPP_BUNDLED_OSG
if ( !QgsApplication::isRunningFromBuildDir() )
{
osgDB::Registry::instance()->setLibraryFilePathList( QDir::cleanPath( QgsApplication::pluginPath() + "/../osgPlugins" ).toStdString() );
}
#endif

mSettingsDialog = new QgsGlobePluginDialog( theQgisInterface->mainWindow(), QgisGui::ModalDialogFlags );

0 comments on commit 546b8d2

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