From ca352daf4a837ae068f0c4358e61cf6ea4c96035 Mon Sep 17 00:00:00 2001 From: StupidRepo <69256931+StupidRepo@users.noreply.github.com> Date: Mon, 21 Mar 2022 18:34:55 +0000 Subject: [PATCH] Updated Building for macOS (markdown) --- Building-for-macOS.md | 65 +++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 65 insertions(+) diff --git a/Building-for-macOS.md b/Building-for-macOS.md index f1a3a97..4eae2cf 100644 --- a/Building-for-macOS.md +++ b/Building-for-macOS.md @@ -103,4 +103,69 @@ cd ./dolphin-emu git pull origin cd build cmake .. && make +``` + +### FAQ +## When building Dolphin, I get errors +If you are receiving this error: +``` +CMake Error at Source/Core/DolphinQt/CMakeLists.txt:9 (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.9) 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. +``` + +# Solution 1 +If you have [Homebrew](https://brew.sh/) installed, and you installed QT5 from there, uninstall Homebrew QT5 using this command: + +```bash +brew uninstall qt5 +``` + +Then, download the offline installer from [qt.io/offline-installers](https://www.qt.io/offline-installers), run the installer inside the DMG file and log in or sign up to/for a `QT Account`. + +On the `Installation Folder` step, select your home folder. + +![Your local Home Directory](https://user-images.githubusercontent.com/69256931/159339892-cdf065b6-3f6f-48ac-848f-071dc853e376.png) + +Then, on the `Select Components` page, expand the `Qt x.x.x` section and check the box next to `macOS`. + +![Box selection](https://user-images.githubusercontent.com/69256931/159340196-6a405d7e-8f88-4d7f-b06f-1ae40f39a2a7.png) + +After that, click `Next`, agree to the license(s), click `Next` again then finally, after all that time... + +Click `Install`. + +After it has finished installing, follow these steps: + +Export your Qt5_DIR to the folder in your Qt installation with Qt5Config.cmake in it. In this case, it should be: +```bash +export Qt5_DIR=~/Qtx.x.x +``` + +(Replacing the `x`'s with the version numbers) + +Append the Qt5_DIR to your PATH with `export PATH=$PATH:$Qt5_DIR` + +And then... +`echo "export Qt5_DIR=$Qt5_DIR" >> ~/.bash_profile` +`echo 'export PATH=$PATH:$Qt5_DIR' >> ~/.bash_profile` + +Now, we can build with CMake (make sure to `cd` into the Dolphin source folder!): + +```bash +mkdir -p build +cd build +cmake .. +make ``` \ No newline at end of file