Browse Source

cmake-gui: Fix macOS styling for binaries distributed with Qt 5.10+

According to https://bugreports.qt.io/browse/QTBUG-59428, Qt 5.10 and
above moved macOS style handling into a separate `qmacstyle` plugin.
Install the plugin in our `CMake.app` package on macOS.

Issue: #21606
Brad King 5 years ago
parent
commit
63079b97f0
1 changed files with 3 additions and 0 deletions
  1. 3 0
      Source/QtDialog/CMakeLists.txt

+ 3 - 0
Source/QtDialog/CMakeLists.txt

@@ -119,6 +119,9 @@ if(CMake_INSTALL_DEPENDENCIES AND (APPLE OR WIN32))
   if(APPLE)
     if (INSTALLED_QT_VERSION VERSION_EQUAL 5)
       install_qt_plugin("Qt5::QCocoaIntegrationPlugin" QT_PLUGINS)
+      if(TARGET Qt5::QMacStylePlugin)
+        install_qt_plugin("Qt5::QMacStylePlugin" QT_PLUGINS)
+      endif()
     else()
       # FIXME: Minimize plugins for Qt6.
       install_qt_plugins(QT_COMPONENTS QT_PLUGINS)