Building OVITO on MacOS
Installing dependencies
See the list of requirements and install the required build tools and third-party libraries. OVITO should be compiled with Apple's clang C++ compiler shipping with Xcode. It's easiest to use MacPorts for installing many of the required dependencies. After setting up MacPorts, run
sudo port install netcdf pzlib libssh boost cmake docbook-xml doxygen libxslt yasm
from the terminal to install the dependencies of OVITO.
Next, download and install Qt 5.12.5 for Mac.
Next, download the source code and build a static version of the Libav video encoding library (optional):
curl -O https://libav.org/releases/libav-11.12.tar.gz
tar xzfv libav-11.12.tar.gz
cd libav-11.12
./configure \
--disable-network \
--disable-programs \
--disable-debug \
--disable-doc \
--disable-filters \
--enable-gpl \
--prefix=$HOME/libav
make install
Downloading the source code
To download OVITO's source code into a new directory named ovito
, run:
git clone https://gitlab.com/stuko/ovito.git
Compiling OVITO
Within the source directory, create a build sub-directory and let CMake generate the Makefile:
cd ovito
mkdir build
cd build
cmake -DCMAKE_BUILD_TYPE=Release \
-DCMAKE_INSTALL_PREFIX=../install \
-DCMAKE_PREFIX_PATH=`echo $HOME/Qt/5.*.*/clang_64/` \
-DLIBAV_INCLUDE_DIR=$HOME/libav/include \
-DLIBAV_LIBRARY_DIR=$HOME/libav/lib \
..
Adjust the paths in the command above as needed. If this step fails, or if you want to disable individual components of OVITO, you can now run "ccmake ." to open the CMake configuration program and make changes to the build settings. Once you are done, build OVITO by running
make -j4
If this step succeeds, you can run make install to generate an app bundle in the ovito/install/
directory.