Skip to content

APPLE: Enable Building as Framework#3713

Open
dgovil wants to merge 4 commits intoPixarAnimationStudios:devfrom
dgovil:framework_build
Open

APPLE: Enable Building as Framework#3713
dgovil wants to merge 4 commits intoPixarAnimationStudios:devfrom
dgovil:framework_build

Conversation

@dgovil
Copy link
Copy Markdown
Collaborator

@dgovil dgovil commented Jul 8, 2025

Description of Change(s)

This PR separates out just the framework build part of #2969 into an isolated PR, and addresses the notes from @meshula in the process.

Overview of Changes

  • build_usd.py now adds a --build-apple-framework and --no-build-apple-framework to enable building frameworks. Frameworks are enabled by default for embedded OS builds.
  • When building as a framework, builds are monolithic.
  • Framework builds force TBB and OpenSubdiv to be statically linked. This can be revised in the future, but we discussed this previously, and decided it was the lesser of two evils given we're moving to GCD support.
  • The CMake build calls out to a zsh script (zsh is guaranteed to exist on macOS) to build the framework. This is used because CMake's own native framework build support would be far more invasive a change currently.
  • A new configuration option PXR_EXTRA_BINARY_RELATIVE_RESOURCES allows the resource directory to be configured relative to the binary. This avoids hardcoding patterns in the CPP files, and allows configuration in CMake. This was requested by @meshula as well.

Checklist

@jesschimein
Copy link
Copy Markdown
Collaborator

Filed as internal issue #USD-11201

(This is an automated message. See here for more information.)


# Set that Apple Framework is being build
if (PXR_BUILD_APPLE_FRAMEWORK)
_add_define("PXR_BUILD_APPLE_FRAMEWORK")
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hi @dgovil - I'm curious what the motivation is for this. It's currently not used by anything so is this ok to remove?

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah I think it can be removed. It was vestigial from when I spilt up the PR

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants