diff options
Diffstat (limited to 'examples/webenginewidgets/maps')
| -rw-r--r-- | examples/webenginewidgets/maps/CMakeLists.txt | 14 | ||||
| -rw-r--r-- | examples/webenginewidgets/maps/Info.cmake.macos.plist | 32 | ||||
| -rw-r--r-- | examples/webenginewidgets/maps/doc/src/maps.qdoc | 1 |
3 files changed, 47 insertions, 0 deletions
diff --git a/examples/webenginewidgets/maps/CMakeLists.txt b/examples/webenginewidgets/maps/CMakeLists.txt index f6e6b94ea..7f3f6d9ed 100644 --- a/examples/webenginewidgets/maps/CMakeLists.txt +++ b/examples/webenginewidgets/maps/CMakeLists.txt @@ -22,6 +22,7 @@ qt_add_executable(maps set_target_properties(maps PROPERTIES WIN32_EXECUTABLE TRUE MACOSX_BUNDLE TRUE + MACOSX_BUNDLE_GUI_IDENTIFIER "io.qt.examples.webenginewidgets.maps" ) target_link_libraries(maps PUBLIC @@ -30,6 +31,19 @@ target_link_libraries(maps PUBLIC Qt::WebEngineWidgets ) +if (APPLE) + set_target_properties(maps PROPERTIES + MACOSX_BUNDLE_INFO_PLIST "${CMAKE_CURRENT_SOURCE_DIR}/Info.cmake.macos.plist" + ) + + if (NOT CMAKE_GENERATOR STREQUAL "Xcode") + # Need to sign application for location permissions to work + add_custom_command(TARGET maps + POST_BUILD COMMAND codesign -s - maps.app) + endif() +endif() + + install(TARGETS maps RUNTIME DESTINATION "${INSTALL_EXAMPLEDIR}" BUNDLE DESTINATION "${INSTALL_EXAMPLEDIR}" diff --git a/examples/webenginewidgets/maps/Info.cmake.macos.plist b/examples/webenginewidgets/maps/Info.cmake.macos.plist new file mode 100644 index 000000000..56104a7d9 --- /dev/null +++ b/examples/webenginewidgets/maps/Info.cmake.macos.plist @@ -0,0 +1,32 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> +<plist version="1.0"> +<dict> + <key>CFBundleInfoDictionaryVersion</key> + <string>6.0</string> + <key>CFBundlePackageType</key> + <string>APPL</string> + <key>CFBundleName</key> + <string>${MACOSX_BUNDLE_BUNDLE_NAME}</string> + <key>CFBundleIdentifier</key> + <string>${MACOSX_BUNDLE_GUI_IDENTIFIER}</string> + <key>CFBundleExecutable</key> + <string>${MACOSX_BUNDLE_EXECUTABLE_NAME}</string> + <key>CFBundleVersion</key> + <string>${MACOSX_BUNDLE_BUNDLE_VERSION}</string> + <key>CFBundleShortVersionString</key> + <string>${MACOSX_BUNDLE_SHORT_VERSION_STRING}</string> + <key>LSMinimumSystemVersion</key> + <string>${CMAKE_OSX_DEPLOYMENT_TARGET}</string> + <key>NSHumanReadableCopyright</key> + <string>${MACOSX_BUNDLE_COPYRIGHT}</string> + <key>CFBundleIconFile</key> + <string>${MACOSX_BUNDLE_ICON_FILE}</string> + <key>CFBundleDevelopmentRegion</key> + <string>English</string> + <key>NSSupportsAutomaticGraphicsSwitching</key> + <true/> + <key>NSLocationUsageDescription</key> + <string>The maps demo would like to access your location for demo purposes.</string> +</dict> +</plist> diff --git a/examples/webenginewidgets/maps/doc/src/maps.qdoc b/examples/webenginewidgets/maps/doc/src/maps.qdoc index ad727e165..0175f8b65 100644 --- a/examples/webenginewidgets/maps/doc/src/maps.qdoc +++ b/examples/webenginewidgets/maps/doc/src/maps.qdoc @@ -3,6 +3,7 @@ /*! \example webenginewidgets/maps + \examplecategory {Web Technologies} \title WebEngine Widgets Maps Example \ingroup webengine-widgetexamples \brief Demonstrates how to handle geolocation requests. |
