-
Notifications
You must be signed in to change notification settings - Fork 1.3k
Autodesk: Set Default Path of TBB and OpenSubdiv in pxrConfig.cmake.in #3606
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
base: dev
Are you sure you want to change the base?
Autodesk: Set Default Path of TBB and OpenSubdiv in pxrConfig.cmake.in #3606
Conversation
I tested this with if (NOT DEFINED PXR_FIND_TBB_IN_CONFIG)
set(PXR_FIND_TBB_IN_CONFIG "OFF")
endif()
if (PXR_FIND_TBB_IN_CONFIG)
# Set TBB_DIR to where the TBBConfig.cmake file was located.
# This can be overridden by specifying a different TBB_DIR when running cmake.
if (NOT DEFINED TBB_DIR)
if (NOT [[TBB_DIR-NOTFOUND]] STREQUAL "")
set(TBB_DIR [[TBB_DIR-NOTFOUND]])
endif()
endif()
find_dependency(TBB 2020.3 CONFIG)
endif() I'm unsure of Cmake's behavior if If I built with if (NOT DEFINED PXR_FIND_TBB_IN_CONFIG)
set(PXR_FIND_TBB_IN_CONFIG "ON")
endif()
if (PXR_FIND_TBB_IN_CONFIG)
# Set TBB_DIR to where the TBBConfig.cmake file was located.
# This can be overridden by specifying a different TBB_DIR when running cmake.
if (NOT DEFINED TBB_DIR)
if (NOT [[/src/USD/usd_build/USD/_build/Release/usd0.25.05/py3.10/install/lib/cmake/TBB]] STREQUAL "")
set(TBB_DIR [[/src/USD/usd_build/USD/_build/Release/usd0.25.05/py3.10/install/lib/cmake/TBB]])
endif()
endif()
find_dependency(TBB 2021.9.0 CONFIG)
endif() ...which means we've ended up with a non-portable I'm actually a bit surprised that, if building with |
To be fair this PR - this same issue is also happening with other parts of |
Filed as internal issue #USD-10931 (This is an automated message. See here for more information.) |
/AzurePipelines run |
3 similar comments
/AzurePipelines run |
/AzurePipelines run |
/AzurePipelines run |
Description of Change(s)
Similar to MaterialX exported targets, adding these default paths makes pxrConfig.cmake easy to use, especially when TBB and OpenSubdiv are passed to USD cmake step. And user doesn't need to specify TBB_DIR and OpenSubdiv_DIR when using pxr exported targets.
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)