pxrConfig.cmake: propagate dependencies OpenGL and X11#3648
pxrConfig.cmake: propagate dependencies OpenGL and X11#3648qbisi wants to merge 1 commit intoPixarAnimationStudios:devfrom
Conversation
|
Filed as internal issue #USD-11039 ❗ Please make sure that a signed CLA has been submitted! (This is an automated message. See here for more information.) |
|
You can fix this problem(if it is) yourself. I contribute my code for free. |
|
Hi @qbisi , we don't believe these changes should be necessary, as those dependencies should get picked up transitively from the MaterialX CMake config shipping with MaterialX. Can you provide more context on
|
I am not sure if downstream MaterialX should declare dependency of opengl and x11 in their materiaxconfig.cmake module, as not all targets listed in materiaxtarget.cmake link to opengl/x11. Here is the contents of MateriaXTargets.cmake in nixpkgs |
|
OK, unless other folks see something, I suspect that, since the MaterialX package will build fine on its own, and using OpenUSD's build_usd.py to build USD with MaterialX also works fine (we've not had this error before), that this may be an issue with the nix configuration for OpenUSD. We are unfortunately not able to help or support nix or other external package management systems. |
|
Arch do patch pxrConfig.cmake |
|
@qbisi , we are hoping the workaround in archlinux would be sufficient, and we're very wary of adding an X11 dependency, which we also think should not be required. Can you tell us what happens for you if you just add the OpenGL dependency, and amend your PR? Also, we really do need a CLA if you want the PR and its commit to go into the repo. Otherwise, we can make the fix independently. |
|
If you do propogate dependency opengl, then i can build f3d with vtk-9.4.2( which no longer require opengl in version >9.3) and openusd support. This is a block for me to update vtk from 9.2.6 to 9.4.2 in nixpkgs. For the dependency x11, i catch this dep by analyzing the src code in materiax. Since most downstream project that make use of openusd/materialx will mostly require the x11 dependency themself. This interior propagated dependency of x11 may not be catched/reported by downstream project. Also, i am not sure if materiax should declare find_dependency(X11) itself. Finally, this pr is more than a issue to pull request, you can fix the problem youself, i am satisfied with either propagating dependency opengl or both of opengl and x11. |
Description of Change(s)
This patch fix generated prxConfig.cmake when PXR_ENABLE_MATERIALX_SUPPORT is set to ON.
The target MaterialXRenderGlsl defined in materiax that openusd link to require additional target OpenGL::GL X11::X11 X11::Xt.
see https://github.com/AcademySoftwareFoundation/MaterialX/blob/97505091af01390b888905237ff6aef432bff2dc/source/MaterialXRenderGlsl/CMakeLists.txt#L84-L86.
This patch should work on nixpkgs when i am trying to build f3d with vtk-9.4.2 and openusd support.
Link to proposal (if applicable)
Fixes Issue(s)
Checklist
I have created this PR based on the dev branch
I have followed the coding conventions
I have added unit tests that exercise this functionality (Reference:
testing guidelines)
I have verified that all unit tests pass with the proposed changes
I have submitted a signed Contributor License Agreement (Reference:
Contributor License Agreement instructions)