endif()
if(Qt5Core_FOUND)
- install_qt_plugin("Qt5::QJpegPlugin")
- install_qt_plugin("Qt5::QGifPlugin")
- install_qt_plugin("Qt5::QICOPlugin")
- if(APPLE)
- install_qt_plugin("Qt5::QCocoaIntegrationPlugin")
- endif()
- else()
+ file(GLOB QT_PLUGIN_DIRECTORIES "${QT_PLUGINS_DIR}/imageformats")
+ install(DIRECTORY ${QT_PLUGIN_DIRECTORIES} DESTINATION "${qtplugin_dest_dir}/plugins/" COMPONENT Runtime REGEX "\\_debug\\.dylib$" EXCLUDE)
+ if(APPLE)
+ if(Qt5Core_VERSION VERSION_GREATER_EQUAL 5.10.0)
+ install_qt_plugin("Qt5::QMacStylePlugin")
+ endif()
+ install_qt_plugin("Qt5::QCocoaIntegrationPlugin")
+ endif()
+ else()
# With QT4, just copy all the plugins
file(GLOB QT_PLUGIN_DIRECTORIES "${QT_PLUGINS_DIR}/*")
install(DIRECTORY ${QT_PLUGIN_DIRECTORIES} DESTINATION "${qtplugin_dest_dir}/plugins/" COMPONENT Runtime)
# - install the platform specific plugins (with Qt5)
# - Fixup the bundle
install(CODE "include(BundleUtilities)
- file(WRITE \"\${CMAKE_INSTALL_PREFIX}/${qt_conf_path}\" \"\")
+ file(WRITE \"\${CMAKE_INSTALL_PREFIX}/${qt_conf_path}\" \"[Paths]\\rPlugins = PlugIns\\rTranslations = translations\")
file(GLOB_RECURSE QTPLUGINS
\"\${CMAKE_INSTALL_PREFIX}/${qtplugin_dest_dir}/plugins/*/*${CMAKE_SHARED_LIBRARY_SUFFIX}\")
message(STATUS \"QT plugins [\${CMAKE_INSTALL_PREFIX}/${qtplugin_dest_dir}/plugins/*/*${CMAKE_SHARED_LIBRARY_SUFFIX}]: \${QTPLUGINS}\")