-
Notifications
You must be signed in to change notification settings - Fork 2.7k
Building for macOS
macOS Sierra (10.12) or newer is required to build Dolphin.
You will need to install "Command Line Tools for Xcode". Installing Xcode itself is optional if you have installed the Command Line Tools.
Install Qt5 from the qt.io website
The offline installer can be found here. https://www.qt.io/offline-installers
When it comes to selecting components to install, select the Qt prebuilt components for MacOS.
Export your Qt5_DIR to the folder in your Qt installation with Qt5Config.cmake in it ( this is usually /<your_Qt_installation_folder>/<Qt_version>/clang_64/lib/cmake/Qt5 ) by entering in terminal export Qt5_DIR=<path to Qt5Config>
Append the Qt5_DIR to your PATH with export PATH=$PATH:$Qt5_DIR
If you plan to rebuild Dolphin in the future you'll probably want to update Qt5_DIR and PATH in your .bash_profile as well.
- Using double quotes:
echo "export Qt5_DIR=$Qt5_DIR" >> ~/.bash_profile
- Using single quotes:
echo 'export PATH=$PATH:$Qt5_DIR' >> ~/.bash_profile
To checkout Dolphin's source:
git clone https://github.com/dolphin-emu/dolphin ~/dolphin-emu
cd ~/dolphin-emu
To build with CMake (optionally verbose): Download and install CMake if you don't have it.
Then:
mkdir -p build
cd build
cmake ..
make
The -j
option can be passed to make
in order to compile multiple objects at once.
A good rule of thumb is number of CPU cores plus one. For example, on a quad core CPU make -j5
would be a good choice.
You can execute cmake -L
to view the options that Dolphin's CMake environment supports, as well as their current and possible settings.
If you have any problems compiling, use the verbose option (make VERBOSE=1
) to give more detail. If you report a problem, at a minimum include the last screen-full of lines.
Ninja is a replacement for Make which is a bit faster for a Dolphin-sized project and is worth considering if you intend to rebuild frequently.
After installing it, pass -G Ninja
to CMake and use 'ninja' instead of 'make' (note that ninja is -j
by default).
By default, Clang won't show color diagnostics when not invoked from a TTY, and Ninja buffers compiler output through a pipe to avoid interleaving issues. To fix this, pass to CMake:
-DCMAKE_CXX_FLAGS="-Xclang -fcolor-diagnostics"
All you need to do to update to the latest Dolphin revision is the following:
cd ~/dolphin-emu/build
git pull
make && open Binaries/*
Homepage | Project Site | Forums | Wiki | Issue Tracker | Coding Style | Transifex Page