@@ -182,17 +182,18 @@ Builds for Apple platforms may optionally build as a framework using the `--buil
182182- Building a universal macOS framework is currently not supported. Please generate the arches separately and ` lipo `
183183 them together after.
184184
185- To add the Framework to your application, simply add ` OpenUSD.framework ` to your Xcode project.
185+ To add the Framework to your application, add ` OpenUSD.framework ` to your Xcode project.
186186It is recommended to set it to ` Embed and Sign ` .
187187
188- When including sources from the Framework, you must prefix the include with the framework name.
189- However, you should note that these includes are not portable to non-framework builds.
190- e.g ` #include <OpenUSD/pxr/pxr.h> `
188+ To setup headers, you may then choose one of two routes:
191189
192- Optionally, if you want to avoid prefixed includes for your cross platform code, you can manually add the search path
193- by setting ` SYSTEM_HEADER_SEARCH_PATHS ` in your Xcode target to the Headers directory within the framework.
194- For example, if your Framework folder is in your project, under a folder with the same name as your target, you would
195- set it as ` $(SRCROOT)/$(TARGET_NAME)/OpenUSD.framework/Headers ` .
190+ 1 . Configure the Xcode ` SYSTEM_HEADER_SEARCH_PATHS ` to add the path to your headers. e.g
191+ ` $(SRCROOT)/OpenUSD.framework/Headers ` if the framework exists in your projects root. This is recommended
192+ if you intend to share source files with other platforms.
193+
194+ 2 . Build with ` --prefix-framework-headers ` (or ` -DPXR_APPLE_PREFIX_FRAMEWORK_HEADERS=ON ` if using CMake)
195+ to automatically process the frameworks headers. This requires no extra configuration in Xcode, but does require
196+ that all includes be prefixed with the name of the framework. e.g ` #include <OpenUSD/pxr/pxr.h> `
196197
197198OpenUSD also supports building a combined XCFramework as well of multiple targets.
198199This command takes an optional list of targets to build, but will otherwise build all supported platforms.
0 commit comments