Skip to content

Commit

Permalink
HYDRA-859 : Fix MAYAUSD_MOD_PATH not being part od the downloaded May…
Browse files Browse the repository at this point in the history
…aUsd cuts.
  • Loading branch information
lanierd-adsk committed Feb 7, 2024
1 parent c02cd46 commit 9d3fe0d
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 14 deletions.
3 changes: 2 additions & 1 deletion cmake/modules/FindMayaUsd.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,8 @@ find_package_handle_standard_args(MayaUsd
REQUIRED_VARS
MAYAUSD_INCLUDE_DIR
MAYAUSDAPI_LIBRARY
MAYAUSD_MOD_PATH
#MAYAUSD_MOD_PATH is not part of MayaUsd cuts downloaded so remove it from the requirements
# as we want to be able to build with MayaUsd cuts.
)

if(MayaUsd_FOUND)
Expand Down
28 changes: 15 additions & 13 deletions cmake/test.cmake
Original file line number Diff line number Diff line change
@@ -1,20 +1,22 @@
set(MAYA_USD_DIR ${CMAKE_CURRENT_SOURCE_DIR})

if(MayaUsd_FOUND)
#Add MAYAUSD_MOD_PATH (the path where maya USD .mod file is) to the MAYA_MODULE_PATH
# Get the current value of the environment variable
set(CURRENT_MAYA_MODULE_PATH $ENV{MAYA_MODULE_PATH})
# Append the new path to the current value
if(IS_MACOSX OR IS_LINUX)
#Linux and OSX
set(MAYA_MODULE_PATH "${CURRENT_MAYA_MODULE_PATH}:${MAYAUSD_MOD_PATH}")
else()
#Windows
set(MAYA_MODULE_PATH "${CURRENT_MAYA_MODULE_PATH}\;${MAYAUSD_MOD_PATH}")
if (MAYAUSD_MOD_PATH)
#Add MAYAUSD_MOD_PATH (the path where maya USD .mod file is) to the MAYA_MODULE_PATH
# Get the current value of the environment variable
set(CURRENT_MAYA_MODULE_PATH $ENV{MAYA_MODULE_PATH})
# Append the new path to the current value
if(IS_MACOSX OR IS_LINUX)
#Linux and OSX
set(MAYA_MODULE_PATH "${CURRENT_MAYA_MODULE_PATH}:${MAYAUSD_MOD_PATH}")
else()
#Windows
set(MAYA_MODULE_PATH "${CURRENT_MAYA_MODULE_PATH}\;${MAYAUSD_MOD_PATH}")
endif()
# Export the new value to the environment
set(ENV{MAYA_MODULE_PATH} ${MAYA_MODULE_PATH})
message(STATUS "MAYA_MODULE_PATH is now : ${MAYA_MODULE_PATH}")
endif()
# Export the new value to the environment
set(ENV{MAYA_MODULE_PATH} ${MAYA_MODULE_PATH})
message(STATUS "MAYA_MODULE_PATH is now : ${MAYA_MODULE_PATH}")
endif()

function(mayaUsd_get_unittest_target unittest_target unittest_basename)
Expand Down

0 comments on commit 9d3fe0d

Please sign in to comment.