Skip to content

Replace PUBLIC_{HEADERS,CLASSES} with PRIVATE for plugins - #4205

Open
nvmkuruc wants to merge 1 commit into
PixarAnimationStudios:devfrom
nvmkuruc:remove-public-plugin-headers
Open

Replace PUBLIC_{HEADERS,CLASSES} with PRIVATE for plugins#4205
nvmkuruc wants to merge 1 commit into
PixarAnimationStudios:devfrom
nvmkuruc:remove-public-plugin-headers

Conversation

@nvmkuruc

@nvmkuruc nvmkuruc commented Aug 27, 2026

Copy link
Copy Markdown
Collaborator

Description of Change(s)

While investigating the feasibility of using the MODULE cmake library type to facilitate exporting targets for plugins, I observed that several plugins provided PUBLIC_HEADERS and PUBLIC_CLASSES. (This was previously noted in #4079 as well).

Usage of pxr_plugin is for shared libraries that aren't intended to be linked externally linked against. It's not immediately obvious that these headers are useable outside of the pxr project and that their being tagged as PUBLIC_ wasn't an accident.

This change removes these headers from the installed include directory.

As an aside, I could imagine that for pure organizational purposes, there being a case for pure public headers without any linkage requirements, but that doesn't appear what these are. Future changes might consider disallowing the PUBLIC_ arguments from pxr_plugin. Given that pxr_library offers "libraries with plugin semantics" (libraries with resources and plugInfo.json), there doesn't seem to be a reason to also offer "plugins with semi-library semantics".

Link to proposal (if applicable)

Fixes Issue(s)

Checklist

@jesschimein

Copy link
Copy Markdown
Collaborator

Filed as internal issue #USD-12602

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

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.

2 participants