Compiling OpenMW for Apple Silicon

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

 by the author.

--

--

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store
enzu.ru

enzu.ru

Learning content for the GNU operating system, developed through my eponymous nonprofit (https://enzu.ru)