Build scripts for OpenUSD with LTE custom namespace and monolithic library configuration.
Note: Replace
YOUR_USERNAMEin the badges above with your GitHub username after pushing to your repository.
- CMake 3.20+
- C++17 compiler (GCC 9+ or Clang 10+)
- uv for Python environment management
- ninja (recommended) or make
Install uv:
curl -LsSf https://astral.sh/uv/install.sh | sh- CMake 3.20+
- Visual Studio 2019 or 2022 with C++ build tools
- uv for Python environment management
- ninja (optional, recommended)
Install uv:
powershell -c "irm https://astral.sh/uv/install.ps1 | iex"Install ninja (optional):
choco install ninjaTwo build variants are available:
| Option | Value |
|---|---|
| Namespace | pxr_lte |
| Library Prefix | lte |
| Monolithic | ON |
| Build Type | RelWithDebInfo |
| Install Dir | dist/ |
| Library Size | ~878 MB |
| Python Support | ON |
| Imaging | OFF |
| Option | Value |
|---|---|
| Namespace | pxr_lte |
| Library Prefix | lte |
| Monolithic | ON |
| Build Type | MinSizeRel |
| Install Dir | dist-minsizerel-ms/ |
| Library Size | ~45 MB (94.6% smaller) |
| Python Support | ON |
| Imaging | OFF |
Linux:
./01-checkout.shWindows:
01-checkout.batClones https://github.com/lighttransport/openusd to ./openusd.
Linux:
./02-download-tbb.shWindows:
02-download-tbb.batDownloads and builds Intel oneTBB v2021.12.0. Installs to ./dist/tbb.
Linux:
./03-configure.shWindows:
03-configure.bat- Creates Python virtual environment at
./.venvusing uv - Installs required Python packages (PyOpenGL, jinja2)
- Configures CMake with LTE namespace and monolithic build
Linux:
./04-build.shWindows:
04-build.batBuilds OpenUSD and installs to ./dist.
Linux:
./05-setup-env.shWindows:
05-setup-env.batGenerates setup-usd-env.sh (Linux) or setup-usd-env.bat (Windows) in ./dist for setting up the runtime environment.
Linux:
./01-checkout.sh
./02-download-tbb.sh
./03-configure.sh
./04-build.sh
./05-setup-env.shWindows:
01-checkout.bat
02-download-tbb.bat
03-configure.bat
04-build.bat
05-setup-env.batFor a smaller library size (94.6% reduction):
Linux:
./01-checkout.sh # Same as default
./02-download-tbb.sh # Same as default
./03-configure-minsizerel.sh # Configure for MinSizeRel
./04-build-minsizerel.sh # Build MinSizeRel variant
./05-setup-env-minsizerel.sh # Generate env scriptWindows:
01-checkout.bat REM Same as default
02-download-tbb.bat REM Same as default
03-configure-minsizerel.bat REM Configure for MinSizeRel
04-build-minsizerel.bat REM Build MinSizeRel variant
05-setup-env-minsizerel.bat REM Generate env scriptNote: The MinSizeRel build produces a dramatically smaller library (45 MB vs 838 MB on Linux - 94.6% reduction) but may have slightly reduced performance compared to RelWithDebInfo.
After building, set up the environment:
Linux - RelWithDebInfo build:
source dist/setup-usd-env.shLinux - MinSizeRel build:
source dist-minsizerel-ms/setup-usd-env.shWindows - RelWithDebInfo build:
dist\setup-usd-env.batWindows - MinSizeRel build:
dist-minsizerel-ms\setup-usd-env.batThe setup script sets the following environment variables:
PATH- includesdist/binfor USD command-line toolsLD_LIBRARY_PATH- includesdist/libanddist/tbb/libfor shared librariesPYTHONPATH- includesdist/lib/pythonfor Python modulesPXR_PLUGINPATH_NAME- USD plugin discovery pathUSD_INSTALL_DIR- points to the installation directory
To make this permanent, add to your shell profile:
echo 'source /path/to/openusd-bin/dist/setup-usd-env.sh' >> ~/.bashrc# Check usdcat
usdcat --help
# Check usdtree
usdtree --help
# List all installed tools
ls dist/bin/Expected tools: usdcat, usdtree, usdzip, sdfdump, sdffilter, usdchecker, usddiff, usdedit, usdresolve, usdstitch, usdstitchclips, etc.
# Using the venv Python
.venv/bin/python -c "from pxr import Usd; print('USD Version:', Usd.GetVersion())"Expected output:
USD Version: (0, 25, 11)
.venv/bin/python << 'EOF'
from pxr import Usd, UsdGeom
# Create a new stage
stage = Usd.Stage.CreateNew('test.usda')
# Add a simple sphere
sphere = UsdGeom.Sphere.Define(stage, '/MySphere')
sphere.GetRadiusAttr().Set(2.0)
# Save the stage
stage.Save()
print("Created test.usda successfully")
EOF
# View the created file
usdcat test.usda# Check monolithic library exists
ls -lh dist/lib/lteusd_ms.so
# Check library dependencies
ldd dist/lib/lteusd_ms.so | head -10from pxr import Usd, UsdGeom, Gf
# Create a new stage
stage = Usd.Stage.CreateNew('example.usda')
# Define a transform
xform = UsdGeom.Xform.Define(stage, '/World')
# Define a mesh under the transform
mesh = UsdGeom.Mesh.Define(stage, '/World/Cube')
# Set mesh vertices (simple cube)
mesh.GetPointsAttr().Set([
(-1, -1, -1), (1, -1, -1), (1, 1, -1), (-1, 1, -1),
(-1, -1, 1), (1, -1, 1), (1, 1, 1), (-1, 1, 1)
])
# Save
stage.Save()# View USD file structure
usdtree example.usda
# Convert USDA to USDC (binary)
usdcat example.usda -o example.usdc
# Flatten composed layers
usdcat --flatten composed.usda -o flattened.usda
# Create USDZ package
usdzip -r example.usdz example.usdaAutomated builds are available via GitHub Actions.
-
Build MinSizeRel (Linux x86_64) - Ubuntu latest
- Automatically builds MinSizeRel variant for Linux x86_64
- Uploads build artifacts (retained 30 days)
- Run time: ~30-45 minutes
-
Build MinSizeRel (Linux ARM64) - Ubuntu 24.04 ARM64
- Automatically builds MinSizeRel variant for Linux ARM64
- Uploads build artifacts (retained 30 days)
- Run time: ~30-45 minutes
-
Build MinSizeRel (Windows x86_64) - Windows latest
- Automatically builds MinSizeRel variant for Windows x86_64
- Uploads build artifacts (retained 30 days)
- Run time: ~35-50 minutes
-
Build MinSizeRel (Windows ARM64) - Windows latest
- Automatically builds MinSizeRel variant for Windows ARM64
- Uploads build artifacts (retained 30 days)
- Run time: ~35-50 minutes
-
Build MinSizeRel (macOS ARM64) - macOS 14 (Apple Silicon)
- Automatically builds MinSizeRel variant for macOS ARM64 (M1/M2/M3)
- Uploads build artifacts (retained 30 days)
- Run time: ~25-40 minutes
-
Build and Release (Linux x86_64) - Creates versioned releases
- Triggered by git tags starting with 'v'
- Generates versioned packages for Linux x86_64
- Includes SHA256 checksums
- Attaches artifacts to releases
-
Build and Release (Linux ARM64) - Creates versioned releases
- Triggered by git tags starting with 'v'
- Generates versioned packages for Linux ARM64
- Includes SHA256 checksums
- Attaches artifacts to releases
-
Build and Release (Windows x86_64) - Creates versioned releases
- Triggered by git tags starting with 'v'
- Generates versioned packages for Windows x86_64
- Includes SHA256 checksums
- Attaches artifacts to releases
-
Build and Release (Windows ARM64) - Creates versioned releases
- Triggered by git tags starting with 'v'
- Generates versioned packages for Windows ARM64
- Includes SHA256 checksums
- Attaches artifacts to releases
-
Build and Release (macOS ARM64) - Creates versioned releases
- Triggered by git tags starting with 'v'
- Generates versioned packages for macOS ARM64
- Includes SHA256 checksums
- Attaches artifacts to releases
Automated Release (Recommended):
Simply push a git tag starting with 'v' to automatically trigger release builds for all platforms:
# Create and push a version tag
git tag v1.0.0
git push origin v1.0.0This will automatically:
- Trigger all 5 release workflows in parallel:
- Linux x86_64
- Linux ARM64
- Windows x86_64
- Windows ARM64
- macOS ARM64 (Apple Silicon)
- Build MinSizeRel binaries for all platforms
- Create a GitHub Release with the tag name
- Upload versioned artifacts with SHA256 checksums for each platform
- Generate BUILD_INFO.txt with detailed build information
Manual Release:
Alternatively, use GitHub Actions manual dispatch:
- Go to Actions → Select desired platform workflow (e.g., "Build and Release (Linux ARM64)")
- Click "Run workflow"
- Check "Create a new release"
- Enter release tag (e.g.,
v1.0.0)
Download from GitHub Actions or Releases:
Linux x86_64:
# Extract
tar -xzf openusd-*-minsizerel-linux-x86_64.tar.gz
# Setup and use
cd openusd-*-minsizerel-linux-x86_64
source setup-usd-env.sh
usdcat --helpLinux ARM64:
# Extract
tar -xzf openusd-*-minsizerel-linux-arm64.tar.gz
# Setup and use
cd openusd-*-minsizerel-linux-arm64
source setup-usd-env.sh
usdcat --helpWindows x86_64:
# Extract
Expand-Archive openusd-*-minsizerel-windows-x86_64.zip
# Setup and use
cd openusd-*-minsizerel-windows-x86_64
.\setup-usd-env.bat
usdcat --helpWindows ARM64:
# Extract
Expand-Archive openusd-*-minsizerel-windows-arm64.zip
# Setup and use
cd openusd-*-minsizerel-windows-arm64
.\setup-usd-env.bat
usdcat --helpmacOS ARM64 (Apple Silicon M1/M2/M3):
# Extract
tar -xzf openusd-*-minsizerel-macos-arm64.tar.gz
# Setup and use
cd openusd-*-minsizerel-macos-arm64
source setup-usd-env.sh
usdcat --helpSupported Platforms:
- Linux x86_64
- Linux ARM64
- Windows x86_64
- Windows ARM64
- macOS ARM64 (Apple Silicon)
See .github/WORKFLOWS.md for detailed documentation.
openusd-bin/
├── .github/
│ ├── workflows/
│ │ ├── build-minsizerel.yml # CI workflow (Linux)
│ │ ├── build-minsizerel-windows.yml # CI workflow (Windows)
│ │ ├── release.yml # Release workflow (Linux)
│ │ └── release-windows.yml # Release workflow (Windows)
│ ├── WORKFLOWS.md # Workflow documentation
│ └── CONTRIBUTING.md # Contribution guide
├── .gitignore
├── 01-checkout.sh / .bat # Linux / Windows
├── 02-download-tbb.sh / .bat # Linux / Windows
├── 03-configure.sh / .bat # Linux / Windows
├── 03-configure-minsizerel.sh / .bat # Linux / Windows
├── 04-build.sh / .bat # Linux / Windows
├── 04-build-minsizerel.sh / .bat # Linux / Windows
├── 05-setup-env.sh / .bat # Linux / Windows
├── 05-setup-env-minsizerel.sh / .bat # Linux / Windows
├── README.md
├── openusd/ # Source (after checkout)
├── tbb-src/ # TBB source (after step 2)
├── tbb-build/ # TBB build (after step 2)
├── .venv/ # Python venv (after step 3)
├── build/ # RelWithDebInfo build
├── build-minsizerel/ # MinSizeRel build
├── dist/ # RelWithDebInfo installation
│ ├── bin/
│ ├── lib/
│ │ └── lteusd_ms.so (~878 MB)
│ ├── include/
│ ├── tbb/
│ └── setup-usd-env.sh
└── dist-minsizerel-ms/ # MinSizeRel installation
├── bin/
├── lib/
│ └── lteusd_ms.so (45 MB)
├── include/
└── setup-usd-env.sh