Index: CMakeLists.txt =================================================================== --- CMakeLists.txt +++ CMakeLists.txt @@ -72,15 +72,23 @@ include(GenerateExportHeader) include( MarbleMacros ) +# Generate a standalone app bundle when building on Apple's Mac OS +# unset this to do a build that uses and provides shared libraries and other +# resources in a more unix-traditional layout (e.g. for MacPorts, Fink, HomeBrew etc.) +if(APPLE) + option(APPLE_STANDALONE_BUNDLE "Generate a standalone app bundle when building on Apple Mac" ON) + add_feature_info("App Bundle" APPLE_STANDALONE_BUNDLE "Generate a standalone app bundle when building on Apple Mac.") +endif(APPLE) + #################################################### # Generate the tiles with the tilecreator at compile time # if this option is set, srtm.jpg will not be installed but the generated tiles instead option(MOBILE "Create a Marble version optimized for handheld devices") #################################################### # Build a D-Bus interface for the Marble widget # This is disabled by default for all win32, apple and Android -if(WIN32 OR APPLE OR CMAKE_SYSTEM_NAME STREQUAL Android) +if(WIN32 OR APPLE_STANDALONE_BUNDLE OR CMAKE_SYSTEM_NAME STREQUAL Android) option(BUILD_WITH_DBUS "Build the D-Bus interface for the Marble widget" OFF) else() option(BUILD_WITH_DBUS "Build the D-Bus interface for the Marble widget" ON) @@ -192,16 +200,23 @@ FIND_LIBRARY(APP_SERVICES_LIBRARY ApplicationServices ) MARK_AS_ADVANCED (APP_SERVICES_LIBRARY) SET(MAC_EXTRA_LIBS ${APP_SERVICES_LIBRARY}) - # for Mac OS X, everything is put inside an application bundle - SET (CMAKE_INSTALL_PREFIX ${CMAKE_INSTALL_PREFIX}/) - # path for library references - SET (CMAKE_INSTALL_NAME_DIR @executable_path/lib) - # install the Info.plist file - install(FILES src/mac/Info.plist DESTINATION ${CMAKE_INSTALL_PREFIX}/Marble.app/Contents) - #SET (lib_dir ${CMAKE_INSTALL_PREFIX}/Marble.app/Contents/MacOS/lib) - SET (data_dir ${CMAKE_INSTALL_PREFIX}/Marble.app/Contents/MacOS/resources/data) - set(locale_dir "${data_dir}/locale") - SET (plugin_dir ${CMAKE_INSTALL_PREFIX}/Marble.app/Contents/MacOS/resources/plugins) + if(APPLE_STANDALONE_BUNDLE) + # for Mac OS X, everything is put inside an application bundle + SET (CMAKE_INSTALL_PREFIX ${CMAKE_INSTALL_PREFIX}/) + # path for library references + SET (CMAKE_INSTALL_NAME_DIR @executable_path/lib) + # install the Info.plist file + install(FILES src/mac/Info.plist DESTINATION ${CMAKE_INSTALL_PREFIX}/Marble.app/Contents) + #SET (lib_dir ${CMAKE_INSTALL_PREFIX}/Marble.app/Contents/MacOS/lib) + SET (data_dir ${CMAKE_INSTALL_PREFIX}/Marble.app/Contents/MacOS/resources/data) + set(locale_dir "${data_dir}/locale") + SET (plugin_dir ${CMAKE_INSTALL_PREFIX}/Marble.app/Contents/MacOS/resources/plugins) + else(APPLE_STANDALONE_BUNDLE) + set(data_dir ${CMAKE_INSTALL_FULL_DATAROOTDIR}/marble/data) + set(locale_dir "${CMAKE_INSTALL_FULL_DATAROOTDIR}/locale") + set(plugin_dir ${CMAKE_INSTALL_FULL_LIBDIR}/marble/plugins) + set(CMAKE_MODULES_INSTALL_PATH ${CMAKE_INSTALL_FULL_DATAROOTDIR}/marble/cmake) + endif(APPLE_STANDALONE_BUNDLE) elseif(CMAKE_SYSTEM_NAME STREQUAL Android) set(plugin_dir "${CMAKE_INSTALL_PREFIX}/assets/plugins") set(data_dir "${CMAKE_INSTALL_PREFIX}/assets/data") Index: data/CMakeLists.txt =================================================================== --- data/CMakeLists.txt +++ data/CMakeLists.txt @@ -270,14 +270,14 @@ install (FILES placemarks/cityplacemarks.cache DESTINATION ${MARBLE_DATA_INSTALL_PATH}/placemarks) endif(MOBILE) -if(NOT APPLE AND NOT WIN32) +if(NOT APPLE_STANDALONE_BUNDLE AND NOT WIN32) install (FILES icons/128-apps-marble.png DESTINATION ${ICON_INSTALL_DIR}/hicolor/128x128/apps/ RENAME marble.png) install (FILES icons/64-apps-marble.png DESTINATION ${ICON_INSTALL_DIR}/hicolor/64x64/apps/ RENAME marble.png) install (FILES icons/48-apps-marble.png DESTINATION ${ICON_INSTALL_DIR}/hicolor/48x48/apps/ RENAME marble.png) install (FILES icons/32-apps-marble.png DESTINATION ${ICON_INSTALL_DIR}/hicolor/32x32/apps/ RENAME marble.png) install (FILES icons/22-apps-marble.png DESTINATION ${ICON_INSTALL_DIR}/hicolor/22x22/apps/ RENAME marble.png) install (FILES icons/16-apps-marble.png DESTINATION ${ICON_INSTALL_DIR}/hicolor/16x16/apps/ RENAME marble.png) -endif(NOT APPLE AND NOT WIN32 ) +endif(NOT APPLE_STANDALONE_BUNDLE AND NOT WIN32 ) FILE (GLOB AUDIO_FILES audio/*.ogg) install (FILES Index: examples/cpp/marble-game/GameMainWindow.cpp =================================================================== --- examples/cpp/marble-game/GameMainWindow.cpp +++ examples/cpp/marble-game/GameMainWindow.cpp @@ -11,6 +11,7 @@ // Self +#include "config-marble.h" #include "GameMainWindow.h" #include "CountryByShape.h" #include "CountryByFlag.h" @@ -82,6 +83,9 @@ QString Private::readMarbleDataPath() const { +#ifdef APPLE_STANDARD_UNIX_BUILD + QSettings::setDefaultFormat(QSettings::IniFormat); +#endif return QSettings().value(QStringLiteral("MarbleWidget/marbleDataPath"), QString()).toString(); } Index: src/CMakeLists.txt =================================================================== --- src/CMakeLists.txt +++ src/CMakeLists.txt @@ -67,14 +67,17 @@ add_subdirectory( bindings ) +if(APPLE AND NOT APPLE_STANDALONE_BUNDLE) + set(APPLE_STANDARD_UNIX_BUILD ON) +endif() configure_file( ${CMAKE_CURRENT_SOURCE_DIR}/config-marble.h.cmake ${CMAKE_CURRENT_BINARY_DIR}/config-marble.h ) -if(APPLE) +if(APPLE AND APPLE_STANDALONE_BUNDLE) add_subdirectory( mac ) -endif(APPLE) +endif(APPLE AND APPLE_STANDALONE_BUNDLE) add_subdirectory( plasma ) add_subdirectory( plasmarunner ) Index: src/apps/marble-kde/CMakeLists.txt =================================================================== --- src/apps/marble-kde/CMakeLists.txt +++ src/apps/marble-kde/CMakeLists.txt @@ -10,6 +10,7 @@ set(LIB_INSTALL_DIR ${KDE_INSTALL_LIBDIR}) include(KDECMakeSettings) include(ECMInstallIcons) +include(ECMAddAppIcon) macro_optional_find_package(KF5 ${REQUIRED_KF5_VERSION} QUIET COMPONENTS Crash NewStuff Parts CoreAddons I18n) @@ -53,6 +54,9 @@ "${CMAKE_SOURCE_DIR}/data/icons/48-apps-marble.png" "${CMAKE_SOURCE_DIR}/data/icons/64-apps-marble.png" DESTINATION ${KDE_INSTALL_ICONDIR}) +file(GLOB ICONS_SRCS + "${CMAKE_CURRENT_SOURCE_DIR}/../../../data/icons/*-apps-marble.png") +ecm_add_app_icon(marble_kde_SRCS ICONS ${ICONS_SRCS}) add_executable (marble ${marble_kde_SRCS}) target_link_libraries ( Index: src/apps/marble-maps/main.cpp =================================================================== --- src/apps/marble-maps/main.cpp +++ src/apps/marble-maps/main.cpp @@ -12,6 +12,7 @@ #include #include +#include "config-marble.h" #include "declarative/MarbleDeclarativePlugin.h" #include #include "MarbleMaps.h" @@ -102,6 +103,9 @@ #if QT_VERSION >= 0x050700 app.setDesktopFileName(QStringLiteral("org.kde.marble.maps")); #endif +#ifdef APPLE_STANDARD_UNIX_BUILD + QSettings::setDefaultFormat(QSettings::IniFormat); +#endif // Load Qt translation system catalog for libmarblewidget, the plugins and this app loadTranslations(app); Index: src/apps/marble-qt/CMakeLists.txt =================================================================== --- src/apps/marble-qt/CMakeLists.txt +++ src/apps/marble-qt/CMakeLists.txt @@ -14,13 +14,13 @@ set_target_properties(marble-qt PROPERTIES LINK_FLAGS "/ENTRY:\"mainCRTStartup\"") endif() else (WIN32) - if (APPLE) + if (APPLE AND APPLE_STANDALONE_BUNDLE) add_executable (marble-qt ${marble_SRCS}) # For Mac OS X, the executable must be at the root of the bundle's executable folder INSTALL(TARGETS marble-qt RUNTIME DESTINATION ${CMAKE_INSTALL_PREFIX}/Marble.app/Contents/MacOS) - else (APPLE) + else (APPLE AND APPLE_STANDALONE_BUNDLE) add_executable (marble-qt ${marble_SRCS}) - endif (APPLE) + endif (APPLE AND APPLE_STANDALONE_BUNDLE) endif (WIN32) target_link_libraries ( @@ -50,11 +50,11 @@ if(WIN32) install (TARGETS marble-qt RUNTIME DESTINATION ${CMAKE_INSTALL_PREFIX}) else(WIN32) -if (APPLE) +if (APPLE AND APPLE_STANDALONE_BUNDLE) # No need for this when installing to a bundle -else (APPLE) +else (APPLE AND APPLE_STANDALONE_BUNDLE) install (TARGETS marble-qt RUNTIME DESTINATION bin ) -endif (APPLE) +endif (APPLE AND APPLE_STANDALONE_BUNDLE) endif(WIN32) if(APPS_INSTALL_DIR) install(PROGRAMS org.kde.marble-qt.desktop DESTINATION ${APPS_INSTALL_DIR}) Index: src/apps/marble-qt/qtmain.cpp =================================================================== --- src/apps/marble-qt/qtmain.cpp +++ src/apps/marble-qt/qtmain.cpp @@ -16,6 +16,8 @@ #include #include +#include "config-marble.h" + #include "QtMainWindow.h" #include "MapThemeManager.h" @@ -32,7 +34,8 @@ Q_IMPORT_PLUGIN(qsvg) #endif -#ifdef Q_OS_MACX +#ifdef Q_OS_MACOS +#include //for getting app bundle path #include #endif @@ -92,6 +95,9 @@ #if QT_VERSION >= 0x050700 app.setDesktopFileName(QStringLiteral("org.kde.marble-qt")); #endif +#ifdef APPLE_STANDARD_UNIX_BUILD + QSettings::setDefaultFormat(QSettings::IniFormat); +#endif // Load Qt translation system catalog for libmarblewidget, the plugins and this app loadTranslations(app); @@ -107,7 +113,7 @@ QApplication::addLibraryPath( QApplication::applicationDirPath() + QDir::separator() + QLatin1String("plugins")); #endif -#ifdef Q_OS_MACX +#ifdef Q_OS_MACOS QApplication::instance()->setAttribute(Qt::AA_DontShowIconsInMenus); qDebug("Adding qt image plugins to plugin search path..."); CFURLRef myBundleRef = CFBundleCopyBundleURL(CFBundleGetMainBundle()); @@ -122,7 +128,7 @@ // lets try to set the qt plugin search path... if (myPath.contains(".app")) { - myPath += QLatin1String("/Contents/plugins"); + myPath += QLatin1String("/Contents/Resources/plugins"); QApplication::addLibraryPath( myPath ); qDebug( "Added %s to plugin search path", qPrintable( myPath ) ); } Index: src/config-marble.h.cmake =================================================================== --- src/config-marble.h.cmake +++ src/config-marble.h.cmake @@ -2,3 +2,6 @@ #define MARBLE_PLUGIN_PATH "${MARBLE_PLUGIN_PATH}" #define MARBLE_DATA_PATH "${MARBLE_DATA_PATH}" #define MARBLE_SHARED_LIBRARY_PREFIX "${CMAKE_SHARED_LIBRARY_PREFIX}" + +#cmakedefine APPLE_STANDALONE_BUNDLE +#cmakedefine APPLE_STANDARD_UNIX_BUILD Index: src/lib/astro/CMakeLists.txt =================================================================== --- src/lib/astro/CMakeLists.txt +++ src/lib/astro/CMakeLists.txt @@ -51,7 +51,7 @@ # choose the correct target install library path if(WIN32) INSTALL(TARGETS astro EXPORT AstroTargets RUNTIME DESTINATION ${CMAKE_INSTALL_PREFIX} ARCHIVE DESTINATION lib) -elseif(APPLE) +elseif(APPLE AND APPLE_STANDALONE_BUNDLE) INSTALL(TARGETS astro LIBRARY DESTINATION ${CMAKE_INSTALL_PREFIX}/Marble.app/Contents/MacOS/lib) else() install(TARGETS astro @@ -62,7 +62,7 @@ ########### install headers & cmake config files ############### -if (APPLE) +if (APPLE AND APPLE_STANDALONE_BUNDLE) # TODO: find how to install & deploy library, headers and config files as bundle for development return() endif() Index: src/lib/marble/AbstractFloatItem.cpp =================================================================== --- src/lib/marble/AbstractFloatItem.cpp +++ src/lib/marble/AbstractFloatItem.cpp @@ -47,7 +47,7 @@ }; QPen AbstractFloatItemPrivate::s_pen = QPen( Qt::black ); -#ifdef Q_OS_MACX +#ifdef Q_OS_MACOS QFont AbstractFloatItemPrivate::s_font = QFont( QStringLiteral("Sans Serif"), 10 ); #else QFont AbstractFloatItemPrivate::s_font = QFont( QStringLiteral("Sans Serif"), 8 ); Index: src/lib/marble/CMakeLists.txt =================================================================== --- src/lib/marble/CMakeLists.txt +++ src/lib/marble/CMakeLists.txt @@ -447,7 +447,7 @@ # choose the correct target install library path if(WIN32) install(TARGETS marblewidget EXPORT MarbleTargets RUNTIME DESTINATION ${CMAKE_INSTALL_PREFIX} ARCHIVE DESTINATION lib) -elseif(APPLE) +elseif(APPLE AND APPLE_STANDALONE_BUNDLE) install(TARGETS marblewidget LIBRARY DESTINATION ${CMAKE_INSTALL_PREFIX}/Marble.app/Contents/MacOS/lib) else() install(TARGETS marblewidget @@ -458,7 +458,7 @@ ########### install headers & cmake config files ############### -if (APPLE) +if (APPLE AND APPLE_STANDALONE_BUNDLE) # TODO: find how to install & deploy library, headers and config files as bundle for development return() endif() Index: src/lib/marble/MapThemeSortFilterProxyModel.cpp =================================================================== --- src/lib/marble/MapThemeSortFilterProxyModel.cpp +++ src/lib/marble/MapThemeSortFilterProxyModel.cpp @@ -9,6 +9,7 @@ // Copyright 2009 Torsten Rahn // +#include "config-marble.h" #include "MapThemeSortFilterProxyModel.h" #include @@ -52,14 +53,20 @@ const QAbstractItemModel *model = index.model(); QModelIndex columnIndex = model->index( index.row(), 0, QModelIndex() ); QString const key = QLatin1String("Favorites/") + model->data(columnIndex).toString(); +#ifdef APPLE_STANDARD_UNIX_BUILD + QSettings::setDefaultFormat(QSettings::IniFormat); +#endif return QSettings().contains( key ); } QDateTime MapThemeSortFilterProxyModel::favoriteDateTime( const QModelIndex& index ) { const QAbstractItemModel *model = index.model(); QModelIndex columnIndex = model->index( index.row(), 0, QModelIndex() ); QString const key = QLatin1String("Favorites/") + model->data(columnIndex).toString(); +#ifdef APPLE_STANDARD_UNIX_BUILD + QSettings::setDefaultFormat(QSettings::IniFormat); +#endif return QSettings().value( key ).toDateTime(); } Index: src/lib/marble/MapViewItemDelegate.cpp =================================================================== --- src/lib/marble/MapViewItemDelegate.cpp +++ src/lib/marble/MapViewItemDelegate.cpp @@ -14,6 +14,7 @@ // //Self +#include "config-marble.h" #include "MapViewItemDelegate.h" //Qt @@ -62,6 +63,9 @@ int const padding = 5; QString const name = index.data().toString(); +#ifdef APPLE_STANDARD_UNIX_BUILD + QSettings::setDefaultFormat(QSettings::IniFormat); +#endif const bool isFavorite = QSettings().contains(QLatin1String("Favorites/") + name); QSize const bookmarkSize( 16, 16 ); QRect bookmarkRect( iconRect.bottomRight(), bookmarkSize ); Index: src/lib/marble/MapViewWidget.cpp =================================================================== --- src/lib/marble/MapViewWidget.cpp +++ src/lib/marble/MapViewWidget.cpp @@ -14,6 +14,7 @@ // // Self +#include "config-marble.h" #include "MapViewWidget.h" // Marble @@ -72,6 +73,9 @@ { m_mapSortProxy.setDynamicSortFilter( true ); m_celestialListProxy.setDynamicSortFilter( true ); +#ifdef APPLE_STANDARD_UNIX_BUILD + QSettings::setDefaultFormat(QSettings::IniFormat); +#endif } ~Private() Index: src/lib/marble/MarbleDirs.cpp =================================================================== --- src/lib/marble/MarbleDirs.cpp +++ src/lib/marble/MarbleDirs.cpp @@ -30,7 +30,7 @@ #include #endif -#ifdef Q_OS_MACX +#ifdef APPLE_STANDALONE_BUNDLE //for getting app bundle path #include #endif @@ -131,7 +131,7 @@ return QCoreApplication::applicationDirPath() + QDir::separator() + QLatin1String("data"); #endif -#ifdef Q_OS_MACX +#ifdef APPLE_STANDALONE_BUNDLE // // On OSX lets try to find any file first in the bundle // before branching out to home and sys dirs @@ -144,8 +144,8 @@ CFRelease(myMacPath); //do some magick so that we can still find data dir if //marble was not built as a bundle - if (myPath.contains(QLatin1String(".app"))) { //its a bundle! - systempath = myPath + QLatin1String("/Contents/Resources/data"); + if (myPath.contains(QLatin1String(".app"))) { //it's a bundle! + systempath = myPath + QLatin1String("/Contents/Resources"); } if ( QFile::exists( systempath ) ){ @@ -185,7 +185,7 @@ QString systempath; -#ifdef Q_OS_MACX +#ifdef APPLE_STANDALONE_BUNDLE // // On OSX lets try to find any file first in the bundle // before branching out to home and sys dirs Index: src/lib/marble/QtMarbleConfigDialog.cpp =================================================================== --- src/lib/marble/QtMarbleConfigDialog.cpp +++ src/lib/marble/QtMarbleConfigDialog.cpp @@ -10,6 +10,7 @@ // // Own +#include "config-marble.h" #include "QtMarbleConfigDialog.h" #include "ui_MarbleCacheSettingsWidget.h" @@ -62,6 +63,9 @@ m_cloudSyncManager(cloudSyncManager), m_pluginModel() { +#ifdef APPLE_STANDARD_UNIX_BUILD + QSettings::setDefaultFormat(QSettings::IniFormat); +#endif } Ui::MarbleViewSettingsWidget ui_viewSettings; Index: src/lib/marble/StyleBuilder.cpp =================================================================== --- src/lib/marble/StyleBuilder.cpp +++ src/lib/marble/StyleBuilder.cpp @@ -682,7 +682,7 @@ QString defaultFamily = m_defaultFont.family(); -#ifdef Q_OS_MACX +#ifdef Q_OS_MACOS int defaultSize = 10; #else int defaultSize = 8; Index: src/lib/marble/declarative/MarbleQuickItem.cpp =================================================================== --- src/lib/marble/declarative/MarbleQuickItem.cpp +++ src/lib/marble/declarative/MarbleQuickItem.cpp @@ -9,6 +9,7 @@ // +#include "config-marble.h" #include #include #include @@ -983,6 +984,9 @@ void MarbleQuickItem::loadSettings() { +#ifdef APPLE_STANDARD_UNIX_BUILD + QSettings::setDefaultFormat(QSettings::IniFormat); +#endif QSettings settings; settings.beginGroup(QStringLiteral("MarbleQuickItem")); double lon = settings.value(QStringLiteral("centerLon"), QVariant(0.0)).toDouble(); @@ -1013,6 +1017,9 @@ void MarbleQuickItem::writeSettings() { +#ifdef APPLE_STANDARD_UNIX_BUILD + QSettings::setDefaultFormat(QSettings::IniFormat); +#endif QSettings settings; settings.beginGroup(QStringLiteral("MarbleQuickItem")); settings.setValue(QStringLiteral("centerLon"), QVariant(d->m_map.centerLongitude())); Index: src/lib/marble/declarative/Settings.cpp =================================================================== --- src/lib/marble/declarative/Settings.cpp +++ src/lib/marble/declarative/Settings.cpp @@ -8,6 +8,7 @@ // Copyright 2011 Dennis Nienhüser // +#include "config-marble.h" #include "Settings.h" #include "MarbleDebug.h" @@ -48,14 +49,22 @@ QVariant Settings::value( const QString &group, const QString &key, const QVariant &value ) const { +#ifdef APPLE_STANDARD_UNIX_BUILD + QSettings settings( QSettings::IniFormat, QSettings::UserScope, m_organizationName, m_applicationName ); +#else QSettings settings( m_organizationName, m_applicationName ); +#endif settings.beginGroup( group ); return settings.value( key, value ); } void Settings::setValue( const QString &group, const QString &key, const QVariant &value ) { +#ifdef APPLE_STANDARD_UNIX_BUILD + QSettings settings( QSettings::IniFormat, QSettings::UserScope, m_organizationName, m_applicationName ); +#else QSettings settings( m_organizationName, m_applicationName ); +#endif settings.beginGroup( group ); settings.setValue( key, value ); settings.endGroup(); Index: src/lib/marble/geodata/data/GeoDataLabelStyle.cpp =================================================================== --- src/lib/marble/geodata/data/GeoDataLabelStyle.cpp +++ src/lib/marble/geodata/data/GeoDataLabelStyle.cpp @@ -19,7 +19,7 @@ namespace Marble { -#ifdef Q_OS_MACX +#ifdef Q_OS_MACOS static const int defaultSize = 10; #else static const int defaultSize = 8; Index: src/plugins/render/foursquare/FoursquarePlugin.cpp =================================================================== --- src/plugins/render/foursquare/FoursquarePlugin.cpp +++ src/plugins/render/foursquare/FoursquarePlugin.cpp @@ -8,6 +8,7 @@ // Copyright 2012 Utku Aydın // +#include "config-marble.h" #include "FoursquarePlugin.h" #include "FoursquareModel.h" @@ -79,6 +80,9 @@ bool FoursquarePlugin::isAuthenticated() { +#ifdef APPLE_STANDARD_UNIX_BUILD + QSettings::setDefaultFormat(QSettings::IniFormat); +#endif QSettings settings; return !settings.value(QStringLiteral("access_token")).isNull(); @@ -88,6 +92,9 @@ { QString expected = "http://edu.kde.org/marble/dummy#access_token="; if( tokenUrl.startsWith( expected ) ) { +#ifdef APPLE_STANDARD_UNIX_BUILD + QSettings::setDefaultFormat(QSettings::IniFormat); +#endif QSettings settings; QString url = tokenUrl; settings.setValue(QStringLiteral("access_token"), url.remove(expected)); Index: src/plugins/render/graticule/GraticulePlugin.cpp =================================================================== --- src/plugins/render/graticule/GraticulePlugin.cpp +++ src/plugins/render/graticule/GraticulePlugin.cpp @@ -269,7 +269,7 @@ } // Setting the label font for the coordinate lines. -#ifdef Q_OS_MACX +#ifdef Q_OS_MACOS int defaultFontSize = 10; #else int defaultFontSize = 8; Index: src/plugins/render/measure/MeasureToolPlugin.cpp =================================================================== --- src/plugins/render/measure/MeasureToolPlugin.cpp +++ src/plugins/render/measure/MeasureToolPlugin.cpp @@ -36,7 +36,7 @@ MeasureToolPlugin::MeasureToolPlugin( const MarbleModel *marbleModel ) : RenderPlugin( marbleModel ), m_measureLineString( GeoDataLineString( Tessellate ) ), -#ifdef Q_OS_MACX +#ifdef Q_OS_MACOS m_font_regular( QFont( QStringLiteral( "Sans Serif" ), 10, 50, false ) ), #else m_font_regular( QFont( QStringLiteral( "Sans Serif" ), 8, 50, false ) ), Index: src/plugins/render/weather/WeatherItem.cpp =================================================================== --- src/plugins/render/weather/WeatherItem.cpp +++ src/plugins/render/weather/WeatherItem.cpp @@ -312,7 +312,7 @@ }; // FIXME: Fonts to be defined globally -#ifdef Q_OS_MACX +#ifdef Q_OS_MACOS QFont WeatherItemPrivate::s_font = QFont( QStringLiteral( "Sans Serif" ), 10 ); #else QFont WeatherItemPrivate::s_font = QFont( QStringLiteral( "Sans Serif" ), 8 ); Index: src/plugins/runner/gpx/CMakeLists.txt =================================================================== --- src/plugins/runner/gpx/CMakeLists.txt +++ src/plugins/runner/gpx/CMakeLists.txt @@ -69,7 +69,7 @@ # register thumbnail plugin as handler install(FILES marble_thumbnail_gpx.desktop DESTINATION ${KDE_INSTALL_KSERVICES5DIR}) -if(NOT WIN32 AND NOT APPLE) +if(NOT WIN32 AND NOT APPLE_STANDALONE_BUNDLE) # register marble app as handler install(FILES marble_gpx.desktop DESTINATION ${KDE_INSTALL_APPDIR}) endif() Index: src/plugins/runner/json/CMakeLists.txt =================================================================== --- src/plugins/runner/json/CMakeLists.txt +++ src/plugins/runner/json/CMakeLists.txt @@ -30,7 +30,7 @@ # register thumbnail plugin as handler install(FILES marble_thumbnail_geojson.desktop DESTINATION ${KDE_INSTALL_KSERVICES5DIR}) -if(NOT WIN32 AND NOT APPLE) +if(NOT WIN32 AND NOT APPLE_STANDALONE_BUNDLE) # register marble app as handler install(FILES marble_geojson.desktop DESTINATION ${KDE_INSTALL_APPDIR}) endif() Index: src/plugins/runner/kml/CMakeLists.txt =================================================================== --- src/plugins/runner/kml/CMakeLists.txt +++ src/plugins/runner/kml/CMakeLists.txt @@ -34,7 +34,7 @@ install(FILES marble_thumbnail_kml.desktop DESTINATION ${KDE_INSTALL_KSERVICES5DIR}) install(FILES marble_thumbnail_kmz.desktop DESTINATION ${KDE_INSTALL_KSERVICES5DIR}) -if(NOT WIN32 AND NOT APPLE) +if(NOT WIN32 AND NOT APPLE_STANDALONE_BUNDLE) # register marble app as handler install(FILES marble_kml.desktop DESTINATION ${KDE_INSTALL_APPDIR}) install(FILES marble_kmz.desktop DESTINATION ${KDE_INSTALL_APPDIR}) Index: src/plugins/runner/shp/CMakeLists.txt =================================================================== --- src/plugins/runner/shp/CMakeLists.txt +++ src/plugins/runner/shp/CMakeLists.txt @@ -34,7 +34,7 @@ # register thumbnail plugin as handler install(FILES marble_thumbnail_shp.desktop DESTINATION ${KDE_INSTALL_KSERVICES5DIR}) -if(NOT WIN32 AND NOT APPLE) +if(NOT WIN32 AND NOT APPLE_STANDALONE_BUNDLE) # register marble app as handler install(FILES marble_shp.desktop DESTINATION ${KDE_INSTALL_APPDIR}) endif() Index: tests/CMakeLists.txt =================================================================== --- tests/CMakeLists.txt +++ tests/CMakeLists.txt @@ -14,10 +14,10 @@ # Since the tests are not actually installed, but rather # run directly from the build/src/tests dir we need to # ensure the marble libs can be found. -IF (APPLE) +IF (APPLE AND APPLE_STANDALONE_BUNDLE) # For Mac OS X, the executable must be at the root of the bundle's executable folder SET (CMAKE_INSTALL_NAME_DIR @executable_path/../lib) -ENDIF (APPLE) +ENDIF (APPLE AND APPLE_STANDALONE_BUNDLE) set( EXECUTABLE_OUTPUT_PATH ${CMAKE_CURRENT_BINARY_DIR} )