Building for OpenBSD
OpenBSD is not officially supported. These instructions are not actively updated and represent what happened to work for one user on amd64 in March 2018.
Install the required packages: (Please amend if you notice some are missing, I did not test this on a clean installation!)
pkg_add cmake sdl2 qtbase
The repository uses submodules, so remember to clone it recursively:
git clone --recursive https://github.com/citra-emu/citra
To build, run the following in the repository root directory:
mkdir build && cd build
-DCMAKE_CXX_FLAGS='-I/usr/local/include -O2' \
-DCMAKE_EXE_LINKER_FLAGS='-z wxneeded' ..
Qt5_DIRis necessary because cmake does not know to look for it under
-I/usr/local/includeis needed for the compiler to find
iconv.h, as the base compiler does not look under
-O2is needed for playable performance; this needs to be set even if
CMAKE_BUILD_TYPE=Release, as it does not set optimization flags by default (perhaps because the base amd64 compiler is clang?)
- Linking with
-z wxneededis needed to enable writable-executable memory on OpenBSD. The resulting binary still needs to be run a partition with
wxallowedset in the mount flags;
/usr/localis mounted like this by default.