Compiling OpenMW for Apple Silicon

enzu.ru
2 min readApr 6, 2021
OpenMW running natively on my Apple Silicon laptop

Brian Kelley has contributed my changes upstream, so I am no longer maintaining anything separately. OpenMW should compile for Apple Silicon out-of-the-box now: https://gitlab.com/OpenMW/openmw/-/merge_requests/1399

I recently managed to compile OpenMW for Apple Silicon. These are brief notes on how to do it. This is still less stable than the x86–64 version.

Instructions are adapted from this OpenMW wiki page: https://webcache.googleusercontent.com/search?q=cache:djVFTKYH5MgJ:https://wiki.openmw.org/index.php/Development_Environment_Setup+&cd=1&hl=en&ct=clnk&gl=us&client=safari

  1. Make sure you have Xcode and brew installed
  2. Install the following packages. All of these are native for Apple Silicon:
brew install cmake
brew install pkg-config
brew install qt@5
brew install lz4

3. Clone my fork of the OpenMW dependency repository (I’ve only added one commit in case you’re interested in cherry picking it):

git clone git@github.com:enzuru/openmw-deps-mac.git
cd openmw-deps-mac
git fetch
git checkout adjust-for-apple-silicon
cd src
mkdir build
cmake ..
make

4. The above step will fail first due to an issue with the Boost library. You’ll need to open this file…

emacs /openmw-deps-mac/src/boost/tools/build/src/tools/darwin.jam

…and comment out line 143:

#flags darwin.compile.c++ OPTIONS $(condition) : -fcoalesce-templates ;

5. Compile again and that should complete the dependencies step:

cd openmw-deps-mac/src
make

6. Pull the offical OpenMW repository and compile:

# Adjust these paths according to your setup
export PATH_TO_DEPENDENCIES_DIR=/Users/enzuru/src/openmw-deps-mac/build/openmw-deps
export PATH_TO_QT_INSTALLATION=/opt/homebrew/Cellar/qt@5/5.15.2/lib/cmake

git clone https://gitlab.com/OpenMW/openmw/
cd openmw
mkdir build
cmake -D CMAKE_PREFIX_PATH="$PATH_TO_DEPENDENCIES_DIR;$PATH_TO_QT_INSTALLATION" -D CMAKE_BUILD_TYPE=Debug -G"Unix Makefiles" ../openmw/
make

7. You will now have new .app files that you can open:

open OpenMW.app
open OpenMW-CS.app

--

--

enzu.ru

Learning content for the GNU operating system and Lisp user space, developed through my eponymous charity (https://enzu.ru)