Skip to content

Propagate CMake dependency for opengl/x11#2752

Merged
jstone-lucasfilm merged 3 commits intoAcademySoftwareFoundation:mainfrom
qbisi:opengl-x11
Jan 21, 2026
Merged

Propagate CMake dependency for opengl/x11#2752
jstone-lucasfilm merged 3 commits intoAcademySoftwareFoundation:mainfrom
qbisi:opengl-x11

Conversation

@qbisi
Copy link
Copy Markdown
Contributor

@qbisi qbisi commented Jan 19, 2026

Hi, this pr aims to fix cmake configure error of vtk-9.6.0 when building with openusd with materialx.
In nixpkgs, the cmake configure system will complain

CMake Error at /nix/store/0b2sw8gp8qa0pqznnhirlm2gqx8h919b-python3.13-materialx-1.39.4/lib/cmake/MaterialX/MaterialXTargets.cmake:270 (set_target_properties):
  The link interface of target "MaterialXRenderHw" contains:

    X11::X11

  but the target was not found.  Possible reasons include:

    * There is a typo in the target name.
    * A find_package call is missing for an IMPORTED target.
    * An ALIAS target is missing.

also the target OpenGL::OpenGL X11::Xt is required to link with other MaterialX target.

So, i believe MaterialX need to propagate dependency OpenGL/libX11/libXt for downstream project to link with.

Note, in the last commit, i propagate OpenGL dependency conditionally as only the target MaterialXRenderGlsl link publicly with OpenGL, so i propagate OpenaGl optionally when downstream project require the component RenderGlsl explicitly (e.g. openusd might need this), tell me if you want this to be unconditionally propagated.

resolve #2421.
cc @spiffmon

@linux-foundation-easycla
Copy link
Copy Markdown

linux-foundation-easycla Bot commented Jan 19, 2026

CLA Signed

The committers listed above are authorized under a signed CLA.

@jstone-lucasfilm
Copy link
Copy Markdown
Member

This looks very promising, thanks @qbisi, and I'd love to get feedback from @spiffmon, @JGamache-autodesk, and other domain experts before merging it.

@qbisi
Copy link
Copy Markdown
Contributor Author

qbisi commented Jan 19, 2026

Thanks for quick responding, updated the last commit (find opengl should be in scope unix and not macos).

Copy link
Copy Markdown
Contributor

@JGamache-autodesk JGamache-autodesk left a comment

Choose a reason for hiding this comment

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

LGTM!

Copy link
Copy Markdown
Member

@jstone-lucasfilm jstone-lucasfilm left a comment

Choose a reason for hiding this comment

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

Thanks for putting this together, @qbisi!

@jstone-lucasfilm jstone-lucasfilm changed the title propagate dependency opengl/x11 Propagate CMake dependency for opengl/x11 Jan 21, 2026
@jstone-lucasfilm jstone-lucasfilm merged commit b20f54c into AcademySoftwareFoundation:main Jan 21, 2026
33 checks passed
@qbisi
Copy link
Copy Markdown
Contributor Author

qbisi commented Feb 25, 2026

Hi, any plan to make a new release in 2026. I would like to make a pr to downstream openusd that make use of the finding MaterialXRenderHw component.

@jstone-lucasfilm
Copy link
Copy Markdown
Member

@qbisi Yes, we're in the process of organizing a MaterialX v1.39.5 release, and we'll send out announcements once the first release candidate is available.

@qbisi qbisi mentioned this pull request Mar 12, 2026
13 tasks
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.

MaterialX's cmake config should find_dependency its own OpenGL and X11 dependencies

3 participants