-
Notifications
You must be signed in to change notification settings - Fork 1.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
link error using usd 22.08-rc1 generated cmake configuration #1955
Comments
Hi @cpichard, can you confirm whether you're building with MaterialX support enabled or disabled? |
Hi @sunyab |
Filed as internal issue #USD-7502 |
This is a regression from the introduction of imported targets for linking MaterialX v1.38.4+ in 02a9843 From what I understand there's no way to export transitive imported targets, so there isn't an easy fix for this. This deficiency (IMHO) is documented in a 2 year old discussion from the CMake folks here:
There are a few workarounds:
One possible fix would be to modify So given all that, my inclination is to accept this change in behavior in 22.08 with the hopes of finding a better long-term solution for the next release. If anyone has feedback about any of this please let me know. |
Thanks a lot @sunyab, |
Looking at https://github.com/AcademySoftwareFoundation/MaterialX/blob/main/CMakeLists.txt, the MaterialXConfig.cmake is installed to configure_package_config_file(cmake/modules/MaterialXConfig.cmake.in
${CMAKE_BINARY_DIR}/cmake/${CMAKE_PROJECT_NAME}Config.cmake
INSTALL_DESTINATION "${MATERIALX_GEN_CONFIG_PATH}"
PATH_VARS CMAKE_INSTALL_PREFIX CMAKE_PROJECT_NAME) which is set to set(MATERIALX_GEN_CONFIG_PATH "${MATERIALX_INSTALL_LIB_PATH}/cmake/${CMAKE_PROJECT_NAME}") where set(MATERIALX_INSTALL_LIB_PATH "lib" CACHE STRING "Install lib path (e.g. 'libs', 'lib').") I wonder if you check these variables in the CMakeCache.txt from your MaterialX build, if it will provide some clues as to why the Config.cmake didn't land where your build can see it? Is the "lib" in your
coming from |
Hi @meshula, I had a quick look at the CMakeCache.txt where MaterialX was built and the interesting variables are:
I didn't realise when I read the reply, but All good ! Thanks, Cyril |
Description of Issue
Using the cmake configuration produced by usd-22.08-rc1 results in a link error on macOS
Steps to Reproduce
Create the files CMakeLists.txt and do_nothing.cpp
then create the makefile and compile:
results in
System Information (OS, Hardware)
System Version: macOS 12.4 (21F79)
Kernel Version: Darwin 21.5.0
Apple clang version 13.1.6 (clang-1316.0.21.2.5)
Thread model: posix
Target: arm64-apple-darwin21.5.0
and
Target: x86_64-apple-darwin21.5.0
Package Versions
usd 22.08-rc1
The text was updated successfully, but these errors were encountered: