Fixing Mojave's brew install of Qt

homebrew does not yet officially supports OSX 10.14 -Mojave-.

As such, its Qt install is broken. Also, it does not symlink to /usr/local because of it's cmake issue.

BEWARE, the following is not a fix. It is theoretically WRONG.

Fix

Fix it as follows:

For each file in:

  • /usr/local/lib/cmake/Qt5Core/Qt5CoreConfigExtraMkspecDir.cmake
  • /usr/local/lib/cmake/Qt5Gui/Qt5Gui_QCocoaIntegrationPlugin.cmake
  • /usr/local/lib/cmake/Qt5Gui/Qt5Gui_QFlatpakThemePlugin.cmake
  • /usr/local/lib/cmake/Qt5Gui/Qt5Gui_QGifPlugin.cmake
  • /usr/local/lib/cmake/Qt5Gui/Qt5Gui_QICNSPlugin.cmake
  • /usr/local/lib/cmake/Qt5Gui/Qt5Gui_QICOPlugin.cmake
  • /usr/local/lib/cmake/Qt5Gui/Qt5Gui_QJpegPlugin.cmake
  • /usr/local/lib/cmake/Qt5Gui/Qt5Gui_QMacHeifPlugin.cmake
  • /usr/local/lib/cmake/Qt5Gui/Qt5Gui_QMacJp2Plugin.cmake
  • /usr/local/lib/cmake/Qt5Gui/Qt5Gui_QMinimalIntegrationPlugin.cmake
  • /usr/local/lib/cmake/Qt5Gui/Qt5Gui_QOffscreenIntegrationPlugin.cmake
  • /usr/local/lib/cmake/Qt5Gui/Qt5Gui_QTgaPlugin.cmake
  • /usr/local/lib/cmake/Qt5Gui/Qt5Gui_QTiffPlugin.cmake
  • /usr/local/lib/cmake/Qt5Gui/Qt5Gui_QTuioTouchPlugin.cmake
  • /usr/local/lib/cmake/Qt5Gui/Qt5Gui_QVirtualKeyboardPlugin.cmake
  • /usr/local/lib/cmake/Qt5Gui/Qt5Gui_QWbmpPlugin.cmake
  • /usr/local/lib/cmake/Qt5Gui/Qt5Gui_QWebGLIntegrationPlugin.cmake
  • /usr/local/lib/cmake/Qt5Gui/Qt5Gui_QWebpPlugin.cmake
  • /usr/local/lib/cmake/Qt5Sql/Qt5Sql_QSQLiteDriverPlugin.cmake

Comment out (with a BOL #)

For Qt5Core:

# set(_qt5_corelib_extra_includes ...

For Qt5Gui:

# _populate_Gui_plugin_properties ...

For Qt5Sql:

# _populate_Sql_plugin_properties ...

Then:

# brew link qt --force