Repository navigation
Fix OpenImageIO dependency specification - #2479
marcin-serwin wants to merge 2 commits into
Conversation
Signed-off-by: Marcin Serwin <marcin@serwin.dev>
Signed-off-by: Marcin Serwin <marcin@serwin.dev>
|
|
@marcin-serwin This proposed change looks very reasonable to me, and there are instructions in the comment above on how to address the CLA issue: Let us know how it goes! |
|
I'm not signing the CLA. I release this patch into the public domain, so you can do with it what you please. |
|
@marcin-serwin Alas, I don't believe we're allowed to accept contributions without a CLA, but I understand your point of view. Perhaps you can encourage another developer to contribute this change on your behalf? |
|
Feel free to contribute it yourself. |
|
Thanks for this original suggestion, @marcin-serwin, and I believe we can now close this PR in favor of #2495. |
|
The other PR does not fix the issue with downstream dependencies needing to link to OIIO. I still get the following error when building OpenUSD with MaterialX taken from |
| set_and_check(MATERIALX_PYTHON_DIR "@PACKAGE_CMAKE_INSTALL_PREFIX@/python") | ||
| endif() | ||
|
|
||
| if(@MATERIALX_BUILD_OIIO@) |
There was a problem hiding this comment.
Hi @marcin-serwin , I suspect this should be
if(@MATERIALX_BUILD_OIIO@ AND NOT @MATERIALX_BUILD_SHARED_LIBS@)
because static libraries do need to declare transitive dependencies.
Thanks for showing us the way to declare transitive link dependencies. That is a part of CMake that was unknown to me.
MaterialX libraries do not require declaring dependencies when they are built as shared libraries. You will notice that OiioImageLoader.h does not leak OIIO symbols, same thing for OcioColorManagementSystem.h which does not leak OCIO symbols. It is only when linking against a static MaterialXRender.a that a downstream project needs to know about OIIO.
I will do some experiments and eventually repost that fix (with OCIO included) in order to satisfy the CLAs once I have examined the generated CMake config this produces.
There was a problem hiding this comment.
Thank you, I missed that it's building static libs by default. I wonder why it wasn't necessary to link OIIO downstream before 1.39 even with static libs.
|
Hi @marcin-serwin I have repackaged your fix in #2497. Can you code review please? |
The cmake module in
External/OpenImageIOwas deleted in 1.39.0 version.Since the OpenImageIO package is a link time dependency it needs to be present as a dependency when MaterialX is used as a library.