Skip to content

Instantly share code, notes, and snippets.

@dio
Last active March 31, 2022 23:29
Show Gist options
  • Save dio/8b0ec1061dc6d9a40b0f093d2adcd23e to your computer and use it in GitHub Desktop.
Save dio/8b0ec1061dc6d9a40b0f093d2adcd23e to your computer and use it in GitHub Desktop.

When we received an error similar to the following on macOS:

CMake Error at CMakeLists.txt:77 (find_package):
  By not providing "FindQt5.cmake" in CMAKE_MODULE_PATH this project has
  asked CMake to find a package configuration file provided by "Qt5", but
  CMake did not find one.

  Could not find a package configuration file provided by "Qt5" (requested
  version 5.6.0) with any of the following names:

    Qt5Config.cmake
    qt5-config.cmake

  Add the installation prefix of "Qt5" to CMAKE_PREFIX_PATH or set "Qt5_DIR"
  to a directory containing one of the above files.  If "Qt5" provides a
  separate development package or SDK, be sure it has been installed.

And we have installed Qt5 using brew install qt5:

export CMAKE_PREFIX_PATH=/usr/local/opt/qt@5
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment