diff options
-rw-r--r-- | CMakeLists.txt | 5 | ||||
-rw-r--r-- | cmake/QtBaseGlobalTargets.cmake | 7 | ||||
-rw-r--r-- | cmake/QtConfig.cmake.in | 5 | ||||
-rw-r--r-- | cmake/macos/MacOSXBundleInfo.plist.in | 44 |
4 files changed, 61 insertions, 0 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt index 7027597bd8..62f12110d0 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -19,6 +19,11 @@ if(NOT QT_BUILD_STANDALONE_TESTS) "${CMAKE_CURRENT_SOURCE_DIR}/cmake/3rdparty/kwin" ) + if(APPLE_OSX) + # Add module directory to pick up custom Info.plist template + list(APPEND CMAKE_MODULE_PATH "${CMAKE_CURRENT_SOURCE_DIR}/cmake/macos") + endif() + ## Find the build internals package. set(QT_BUILD_INTERNALS_SKIP_CMAKE_MODULE_PATH_ADDITION TRUE) list(PREPEND CMAKE_PREFIX_PATH diff --git a/cmake/QtBaseGlobalTargets.cmake b/cmake/QtBaseGlobalTargets.cmake index cdc284d6c1..47f9a1afd7 100644 --- a/cmake/QtBaseGlobalTargets.cmake +++ b/cmake/QtBaseGlobalTargets.cmake @@ -267,6 +267,13 @@ qt_copy_or_install(DIRECTORY cmake/ PATTERN "3rdparty" EXCLUDE ) +if(APPLE_OSX) + qt_copy_or_install(FILES + cmake/macos/MacOSXBundleInfo.plist.in + DESTINATION "${__GlobalConfig_install_dir}/macos" + ) +endif() + # Configure and install the QtBuildInternals package. set(__build_internals_path_suffix "${INSTALL_CMAKE_NAMESPACE}BuildInternals") qt_path_join(__build_internals_build_dir ${QT_CONFIG_BUILD_DIR} ${__build_internals_path_suffix}) diff --git a/cmake/QtConfig.cmake.in b/cmake/QtConfig.cmake.in index 6d69c1f90e..e9d2d7f2dc 100644 --- a/cmake/QtConfig.cmake.in +++ b/cmake/QtConfig.cmake.in @@ -34,6 +34,11 @@ list(APPEND CMAKE_MODULE_PATH "${_qt_import_prefix}") list(APPEND CMAKE_MODULE_PATH "${_qt_import_prefix}/3rdparty/extra-cmake-modules/find-modules") list(APPEND CMAKE_MODULE_PATH "${_qt_import_prefix}/3rdparty/kwin") +if(APPLE_OSX) + # Add module directory to pick up custom Info.plist template + list(APPEND CMAKE_MODULE_PATH "${_qt_import_prefix}/macos") +endif() + foreach(module ${@INSTALL_CMAKE_NAMESPACE@_FIND_COMPONENTS}) find_package(@INSTALL_CMAKE_NAMESPACE@${module} ${_@INSTALL_CMAKE_NAMESPACE@_FIND_PARTS_QUIET} diff --git a/cmake/macos/MacOSXBundleInfo.plist.in b/cmake/macos/MacOSXBundleInfo.plist.in new file mode 100644 index 0000000000..99c314f428 --- /dev/null +++ b/cmake/macos/MacOSXBundleInfo.plist.in @@ -0,0 +1,44 @@ +<?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>CFBundleLongVersionString</key> + <string>${MACOSX_BUNDLE_LONG_VERSION_STRING}</string> + + <key>LSMinimumSystemVersion</key> + <string>${CMAKE_OSX_DEPLOYMENT_TARGET}</string> + + <key>CFBundleGetInfoString</key> + <string>${MACOSX_BUNDLE_INFO_STRING}</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>NSPrincipalClass</key> + <string>NSApplication</string> + + <key>NSSupportsAutomaticGraphicsSwitching</key> + <true/> +</dict> +</plist>
\ No newline at end of file |