Skip to content

Building appleseed on OS X

François Beaune edited this page Jan 11, 2014 · 15 revisions

This page will guide you through the steps required to build appleseed on Mac OS X.

Installing Qt (4.7 or later)

Download the Qt development environment from qt-project.org/downloads and install it on your system.

Downloading and building the Boost C++ libraries (1.47.0 or later)

One option is to build Boost as static libraries. To do this, download the latest stable Boost package here (prefer .tar.gz archives as these preserve file permissions) and unpack it in the directory of your choice. Then open a terminal in that directory and type:

./bootstrap.sh
./b2 link=static

The other option is to use the shared libraries present in your system. To do this, when it will come to build appleseed, replace

cmake -DBOOST_ROOT=<absolute-path-to-boost> ../src

by

cmake -DUSE_STATIC_BOOST=OFF ../src

Building zlib

zlib sources are included in the appleseed repository in src/zlib/.

Open a terminal in src/zlib/ and type:

./configure --static
make
mkdir -p ../../build/mac-gcc4/zlib/
cp libz.a ../../build/mac-gcc4/zlib/
make clean

Building libpng

libpng sources are included in the appleseed repository in src/libpng/.

Open a terminal in src/libpng/ and type:

cp scripts/makefile.darwin makefile
make
mkdir -p ../../build/mac-gcc4/libpng/
cp libpng.a ../../build/mac-gcc4/libpng/

Don't do make clean at the end since this would delete pnglibconf.h which is required by png.h.

Building OpenEXR

OpenEXR sources are included in the appleseed repository in src/openexr/.

Open a terminal in src/openexr/ and type:

./configure --prefix=<appleseed-path>/src/openexr
make
make install
mkdir -p ../../build/mac-gcc4/openexr/
cp lib/* ../../build/mac-gcc4/openexr/
make clean

Note: gcc 4.2 and later will complain about -Wno-long-double not being a recognized option:

error: unrecognized command line option "-Wno-long-double"

To fix this problem, edit the configure file in src/openexr/ and, on line 20744, replace

CXXFLAGS="$CXXFLAGS -Wno-long-double"

by

# CXXFLAGS="$CXXFLAGS -Wno-long-double"

and proceed with the instructions above (starting with configure).

Building HDF5

HDF5 sources are included in the appleseed repository in src/hdf5/.

Open a terminal in src/hdf5/ and type:

mkdir build; cd build
cmake -DHDF5_BUILD_HL_LIB=1 -DCMAKE_ARCHIVE_OUTPUT_DIRECTORY=../../../build/mac-gcc4/hdf5 ..
make

Building Alembic

Alembic sources are included in the appleseed repository in src/alembic/.

Open a terminal in src/alembic/ and type:

mkdir build; cd build
cmake -DBOOST_ROOT=<absolute-path-to-boost> ..
make

Building Xerces-C++

Xerces-C++ sources are included in the appleseed repository in src/xerces-c/.

Open a terminal in src/xerces-c/ and type:

chmod +x config/install-sh
export XERCESCROOT=<appleseed-path>/src/xerces-c
./configure
make
mkdir -p ../../build/mac-gcc4/xerces-c/
cp src/.libs/*.a ../../build/mac-gcc4/xerces-c/
make clean

Building appleseed

Open a terminal in the build/ directory of your appleseed installation and type:

cmake -DBOOST_ROOT=<absolute-path-to-boost> ../src
make

In case you want to use a specific version of Qt, replace the first line with

cmake -DBOOST_ROOT=<absolute-path-to-boost>
      -DQT_QMAKE_EXECUTABLE=<absolute-path-to-qmake-executable> ../src