Skip to content

USD on macOS

Nick Porcino edited this page Nov 5, 2019 · 11 revisions

Building USD on macOS with the official script

The Pixar build script (https://github.com/PixarAnimationStudios/usd#getting-and-building-the-code) is a quick and easy way to get an out of the box USD build going using official distributions of the various dependencies.

As a brief addendum to those instructions, homebrew is one way to install an update to cmake.

brew install cmake

Use sudo pip to install necessary python libraries.

sudo pip install pyside2
sudo pip install pyopengl
sudo pip install jinja2

Set up to build in ~/Projects/Pixar/USD,

cd $HOME
mkdir Projects
cd Projects
mkdir Pixar
cd Pixar
git clone https://github.com/PixarAnimationStudios/USD
cd USD
git checkout dev
cd ..

Run the build_usd.py build script

python USD/build_scripts/build_usd.py -v $HOME/Projects/Pixar/BUILD/USD

If the build succeeded, set up environment variables so that the USD binaries and python bindings can be found. The Pixar script will emit the variables and settings you need to set.

And test:

usdview ./USD/extras/usd/tutorials/convertingLayerFormats/Sphere.usda

Using build club to build USD

Building USD on macOS

Building USD this way will create a local cache of all the libraries USD depends on as well as USD itself.

Pick this method if you need to exercise absolute control over the libraries and don't want to mix them in with your system paths.

Run the following in your projects directory:

  git clone https://github.com/PixarAnimationStudios/USD.git
  cd USD
  git checkout dev
  cd ..
  git clone https://github.com/vfxpro99/usd-build-club.git
  mkdir stage
  cd stage
  ../usd-build-club/build-prerequisites-macos.sh
  sudo pip install -U pyside
  sudo pip install -U pyopengl
  sudo pip install -U jinja2
  ../usd-build-club/configure-macos.sh Xcode
  cmake --build . --target install --config Release

Building USD on macOS - Experimental

Building USD this way will create a local cache of all the libraries USD depends on as well as USD itself.

Pick this method if you need to exercise absolute control over the libraries and don't want to mix them in with your system paths.

Run the following in your project directory:

  git clone https://github.com/vfxpro99/usd-build-club.git
  mkdir stage
  cd stage
  ../usd-build-club/build-macos.sh

Building USD on macOS using Brew

Building USD on macOS using Brew will install brew, USD's prerequisites, USD, and a local copy of python in your stage directory.

  git clone https://github.com/vfxpro99/usd-build-club.git
  mkdir stage
  cd stage
  ../usd-build-club/build-macos-brew.sh

When the build is complete, run the following within a terminal to initialize the run time environment:

  cd /path/to/my/stage
  source ../usd-build-club/setvars-macos-brew.sh
Clone this wiki locally