Skip to content

Commit

Permalink
MAYA-122250 UFE 3 build as Universal Binary 2 (x86_64 + arm64)
Browse files Browse the repository at this point in the history
+ Change a few compiler flags to be at part with Maya
+ Fix some easy Python 3 issues.
  • Loading branch information
boudrey committed Apr 11, 2022
1 parent 01a560d commit 33cf218
Show file tree
Hide file tree
Showing 5 changed files with 17 additions and 9 deletions.
9 changes: 8 additions & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,9 @@ option(BUILD_TESTS "Build tests." ON)
option(BUILD_STRICT_MODE "Enforce all warnings as errors." ON)
option(BUILD_SHARED_LIBS "Build libraries as shared or static." ON)
option(BUILD_WITH_PYTHON_3 "Build with python 3." OFF)
if(APPLE)
option(BUILD_UB2 "Build Universal Binary 2 (UB2) Intel64+arm64" OFF)
endif()
set(BUILD_WITH_PYTHON_3_VERSION 3.7 CACHE STRING "The version of Python 3 to build with")
option(CMAKE_WANT_UFE_BUILD "Enable building with UFE (if found)." ON)
option(CMAKE_WANT_MATERIALX_BUILD "Enable building with MaterialX (experimental)." OFF)
Expand All @@ -53,7 +56,11 @@ set(PXR_OVERRIDE_PLUGINPATH_NAME PXR_PLUGINPATH_NAME
# Avoid noisy install messages
set(CMAKE_INSTALL_MESSAGE "NEVER")

set(CMAKE_OSX_ARCHITECTURES "x86_64")
if (BUILD_UB2)
set(CMAKE_OSX_ARCHITECTURES "x86_64;arm64")
else()
set(CMAKE_OSX_ARCHITECTURES "x86_64")
endif()

set(CMAKE_MODULE_PATH
${CMAKE_MODULE_PATH}
Expand Down
3 changes: 2 additions & 1 deletion cmake/compiler_config.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,9 @@ set(GNU_CLANG_FLAGS
# we want to be as strict as possible
-Wall
$<$<BOOL:${BUILD_STRICT_MODE}>:-Werror>
$<$<CONFIG:DEBUG>:-fstack-check>
# optimization
-msse3
-msse4.2
# disable warnings
-Wno-deprecated
-Wno-deprecated-declarations
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -157,7 +157,7 @@ def postImport(self, prim):
if self.__class__.parentNode:
cmds.delete(self.__class__.parentNode)
# re-create the node
# print 'CCCCCCCCCCCCc', cmds.createNode('AL_usdmaya_Transform', name='rig', parent='|bobo|root|peter01')
# print('CCCCCCCCCCCCc', cmds.createNode('AL_usdmaya_Transform', name='rig', parent='|bobo|root|peter01'))

return True

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -45,9 +45,9 @@ def main():

stage.GetEditTarget().GetLayer().Save()

print '==='
print 'usdview %s' % sequenceFilePath
print 'usdcat %s' % setsLayoutLayerFilePath
print('===')
print('usdview %s' % sequenceFilePath)
print('usdcat %s' % setsLayoutLayerFilePath)

if __name__ == '__main__':
main()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -41,9 +41,9 @@ def main():

stage.GetEditTarget().GetLayer().Save()

print '==='
print 'usdview %s' % shotFilePath
print 'usdcat %s' % animLayerFilePath
print('===')
print('usdview %s' % shotFilePath)
print('usdcat %s' % animLayerFilePath)

def _AddCueRigAndCacheVariants(stage):
from pxr import Kind, Sdf, Usd, UsdGeom
Expand Down

0 comments on commit 33cf218

Please sign in to comment.