Skip to content

Commit

Permalink
Add macOS build instructions (dreamworksanimation#69)
Browse files Browse the repository at this point in the history
  • Loading branch information
Jon Lanz authored and GitHub Enterprise committed Apr 23, 2024
1 parent 355d3b8 commit ec85d68
Show file tree
Hide file tree
Showing 2 changed files with 44 additions and 0 deletions.
2 changes: 2 additions & 0 deletions building/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,8 @@ We also provide more concrete examples of the building process:

[Building in a Centos 7 Container](Centos7/centos7_container_build.md)

[Building on macOS Sonoma](macOS/macOS_build.md)

These examples make some arbitrary choices, for example the location of the cloned source, which you can change if you need to. Refer to the general instructions for more information on the possible variations.


42 changes: 42 additions & 0 deletions building/macOS_build.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
# macOS build steps
The build steps for macOS align closely with those for CentOS 7, documented by Dreamworks [here](https://docs.openmoonray.org/getting-started/installation/building-moonray/building-moonray-centos-7/)

But of course, with a few tweaks.

Base requirements:
- macOS Sonoma (macOS 14)
- Install Xcode
- Download and install CMake 3.26.5
https://github.com/Kitware/CMake/releases/download/v3.26.5/cmake-3.26.5-macos-universal.dmg
sudo "/Applications/CMake.app/Contents/bin/cmake-gui" --install

Create a clean root folder for moonray, and follow the next three steps:

1. Create the folders
mkdir -p /Applications/MoonRay/{installs,build,build-deps,source}
mkdir -p /Applications/MoonRay/installs/{bin,lib,include}

2. Check out the OpenMoonRay source - alongside `installs/`
cd /Applications/MoonRay/source
git clone --recurse-submodules <repository>
cd ..
ln -s source/openmoonray/building .
ln -s source/openmoonray .

3. Build the dependencies - alongside `source/` and `installs/`
cd /Applications/MoonRay/build-deps
cmake ../building/macOS
cmake --build .

4. Build MoonRay
cd /Applications/MoonRay/openmoonray
cmake --preset container-macOS
cmake --build --preset container-macOS <— NEW: replaces xcodebuild / cmake install in a single step.

5. Run / test
source /Applications/MoonRay/installs/openmoonray/scripts/setup.sh
cd /Applications/MoonRay/openmoonray/testdata
moonray_gui -exec_mode xpu -info -in curves.rdla

7. Cleanup
rm -rf /Applications/MoonRay/{build,build-deps,openmoonray/release}

0 comments on commit ec85d68

Please sign in to comment.