Closed JGamache-autodesk closed 2 years ago
This means a MaterialX install done to a staging area using -DCMAKE_INSTALL_PREFIX=/my/stage can not be packaged and installed somewhere else.
-DCMAKE_INSTALL_PREFIX=/my/stage
Problem is in /my/stage/lib/cmake/MaterialX/MaterialXTargets.cmake which will contain the line:
/my/stage/lib/cmake/MaterialX/MaterialXTargets.cmake
set(_IMPORT_PREFIX "/my/stage")
There is a mechanism in CMake to keep the MaterialX generated CMake file relocatable and it hinges on keeping all install paths relative.
I would recommend centralizing the library creation into a CMake function that would insure all path are local, this is what is done in USD and it generates a relocatable CMake file.
Fixed via PR #1350 in this repo. Merged back to ILM repo via materialx/MaterialX#805
This means a MaterialX install done to a staging area using
-DCMAKE_INSTALL_PREFIX=/my/stage
can not be packaged and installed somewhere else.Problem is in
/my/stage/lib/cmake/MaterialX/MaterialXTargets.cmake
which will contain the line:There is a mechanism in CMake to keep the MaterialX generated CMake file relocatable and it hinges on keeping all install paths relative.
I would recommend centralizing the library creation into a CMake function that would insure all path are local, this is what is done in USD and it generates a relocatable CMake file.