mirror of
https://github.com/Kitware/CMake.git
synced 2026-03-06 14:48:38 -06:00
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
This commit is contained in:
@@ -57,6 +57,9 @@ if(CMake_INSTALL_DEPENDENCIES AND (APPLE OR WIN32))
|
|||||||
endmacro()
|
endmacro()
|
||||||
if(APPLE)
|
if(APPLE)
|
||||||
install_qt5_plugin("Qt5::QCocoaIntegrationPlugin" QT_PLUGINS)
|
install_qt5_plugin("Qt5::QCocoaIntegrationPlugin" QT_PLUGINS)
|
||||||
|
if(TARGET Qt5::QMacStylePlugin)
|
||||||
|
install_qt5_plugin("Qt5::QMacStylePlugin" QT_PLUGINS)
|
||||||
|
endif()
|
||||||
file(WRITE "${CMAKE_CURRENT_BINARY_DIR}/qt.conf"
|
file(WRITE "${CMAKE_CURRENT_BINARY_DIR}/qt.conf"
|
||||||
"[Paths]\nPlugins = ${_qt_plugin_dir}\n")
|
"[Paths]\nPlugins = ${_qt_plugin_dir}\n")
|
||||||
install(FILES "${CMAKE_CURRENT_BINARY_DIR}/qt.conf"
|
install(FILES "${CMAKE_CURRENT_BINARY_DIR}/qt.conf"
|
||||||
|
|||||||
Reference in New Issue
Block a user