From a4502bbbbe35ec48fc8e2392fcb6271977941a41 Mon Sep 17 00:00:00 2001 From: rlei-weta Date: Thu, 5 May 2022 21:28:42 +1200 Subject: [PATCH 1/2] 22.05 compat, removed FindUSD.cmake and include pxrConfig.cmake directly. Signed-off-by: rlei-weta --- README.md | 14 +++++----- cmake/Packages.cmake | 2 +- cmake/packages/FindUSD.cmake | 51 ------------------------------------ src/usdTri/triangle.cpp | 7 ----- src/usdTri/triangle.h | 11 -------- 5 files changed, 8 insertions(+), 77 deletions(-) delete mode 100644 cmake/packages/FindUSD.cmake diff --git a/README.md b/README.md index a91c30d..dd6886e 100644 --- a/README.md +++ b/README.md @@ -34,7 +34,7 @@ There are many other USD plugins available online - check out [USD Working Group The following dependencies are required: - C++ compiler - [CMake](https://cmake.org/documentation/) (3.13 or greater) -- [USD](https://github.com/pixaranimationstudios/USD) (21.05) +- [USD](https://github.com/pixaranimationstudios/USD) (22.05) - [Boost](https://boost.org) and [Intel TBB](https://www.threadingbuildingblocks.org/) (USD dependencies) [Python](https://www.python.org/) may also be required, depending on python support in the USD installation. @@ -46,9 +46,9 @@ Example snippet for building the plugins on Linux (and potentially MacOS): mkdir build cd build cmake \ - -DUSD_ROOT="/apps/usd/21.05/" \ - -DTBB_ROOT="/apps/usd/21.05/" \ - -DBOOST_ROOT="/apps/usd/21.05/" \ + -DUSD_ROOT="/apps/usd/22.05/" \ + -DTBB_ROOT="/apps/usd/22.05/" \ + -DBOOST_ROOT="/apps/usd/22.05/" \ -DBUILD_TESTING=ON \ -DCMAKE_INSTALL_PREFIX="/apps/USDPluginExamples/" \ .. @@ -65,9 +65,9 @@ cmake ^ -DCMAKE_INSTALL_PREFIX=D:\usd\USDPluginExamples\ ^ -DUSE_PYTHON_3=ON ^ -DBUILD_TESTING=ON ^ - -DUSD_ROOT="D:\usd\builds\v21.05" ^ - -DTBB_ROOT="D:\usd\builds\v21.05" ^ - -DBOOST_ROOT="D:\usd\builds\v21.05" + -DUSD_ROOT="D:\usd\builds\v22.05" ^ + -DTBB_ROOT="D:\usd\builds\v22.05" ^ + -DBOOST_ROOT="D:\usd\builds\v22.05" cmake --build . --config Release -j 8 --target ALL_BUILD RUN_TESTS INSTALL ``` diff --git a/cmake/Packages.cmake b/cmake/Packages.cmake index c2b8698..c7259d1 100644 --- a/cmake/Packages.cmake +++ b/cmake/Packages.cmake @@ -45,5 +45,5 @@ if (ENABLE_PYTHON_SUPPORT) endif() # USD & TBB -find_package(USD REQUIRED) +include(${USD_ROOT}/pxrConfig.cmake) find_package(TBB REQUIRED) diff --git a/cmake/packages/FindUSD.cmake b/cmake/packages/FindUSD.cmake deleted file mode 100644 index 9d86658..0000000 --- a/cmake/packages/FindUSD.cmake +++ /dev/null @@ -1,51 +0,0 @@ -# Simple module to find USD. -# Expects USD_ROOT to be defined. -# Will define: -# USD_INCLUDE_DIR -# USD_LIBRARY_DIR - -message(STATUS ${USD_ROOT}) - -set(PXR_LIB_PREFIX "lib") - -if (MSVC) - # MSVC does not use prefixes for libs - set(PXR_LIB_PREFIX "") -endif() - -find_path(USD_INCLUDE_DIR pxr/pxr.h - PATHS ${USD_ROOT}/include - $ENV{USD_ROOT}/include - DOC "USD Include directory" - NO_DEFAULT_PATH - NO_SYSTEM_ENVIRONMENT_PATH) - -find_path(USD_LIBRARY_DIR - NAMES "${PXR_LIB_PREFIX}usd${CMAKE_SHARED_LIBRARY_SUFFIX}" - PATHS ${USD_ROOT}/lib - $ENV{USD_ROOT}/lib - DOC "USD Libraries directory" - NO_DEFAULT_PATH - NO_SYSTEM_ENVIRONMENT_PATH) -set(USD_LIBRARY_MONOLITHIC FALSE) - -if(USD_INCLUDE_DIR AND EXISTS "${USD_INCLUDE_DIR}/pxr/pxr.h") - foreach(_usd_comp MAJOR MINOR PATCH) - file(STRINGS - "${USD_INCLUDE_DIR}/pxr/pxr.h" - _usd_tmp - REGEX "#define PXR_${_usd_comp}_VERSION .*$") - string(REGEX MATCHALL "[0-9]+" USD_${_usd_comp}_VERSION ${_usd_tmp}) - endforeach() - set(USD_VERSION ${USD_MAJOR_VERSION}.${USD_MINOR_VERSION}.${USD_PATCH_VERSION}) -endif() - -include(FindPackageHandleStandardArgs) - -find_package_handle_standard_args(USD - REQUIRED_VARS - USD_INCLUDE_DIR - USD_LIBRARY_DIR - VERSION_VAR - USD_VERSION -) diff --git a/src/usdTri/triangle.cpp b/src/usdTri/triangle.cpp index 5d8a1b5..872583d 100644 --- a/src/usdTri/triangle.cpp +++ b/src/usdTri/triangle.cpp @@ -58,13 +58,6 @@ UsdTriTriangle::_GetSchemaKind() const return UsdTriTriangle::schemaKind; } -/* virtual */ -UsdSchemaKind -UsdTriTriangle::_GetSchemaType() const -{ - return UsdTriTriangle::schemaType; -} - /* static */ const TfType& UsdTriTriangle::_GetStaticTfType() diff --git a/src/usdTri/triangle.h b/src/usdTri/triangle.h index 285e1ef..00aa91f 100644 --- a/src/usdTri/triangle.h +++ b/src/usdTri/triangle.h @@ -45,11 +45,6 @@ class UsdTriTriangle : public UsdGeomGprim /// \sa UsdSchemaKind static const UsdSchemaKind schemaKind = UsdSchemaKind::ConcreteTyped; - /// \deprecated - /// Same as schemaKind, provided to maintain temporary backward - /// compatibility with older generated schemas. - static const UsdSchemaKind schemaType = UsdSchemaKind::ConcreteTyped; - /// Construct a UsdTriTriangle on UsdPrim \p prim . /// Equivalent to UsdTriTriangle::Get(prim.GetStage(), prim.GetPath()) /// for a \em valid \p prim, but will not immediately throw an error for @@ -120,12 +115,6 @@ class UsdTriTriangle : public UsdGeomGprim USDTRI_API UsdSchemaKind _GetSchemaKind() const override; - /// \deprecated - /// Same as _GetSchemaKind, provided to maintain temporary backward - /// compatibility with older generated schemas. - USDTRI_API - UsdSchemaKind _GetSchemaType() const override; - private: // needs to invoke _GetStaticTfType. friend class UsdSchemaRegistry; From f4554262a84e9d54eed994133e96789e57a1ce8c Mon Sep 17 00:00:00 2001 From: rlei-weta Date: Sat, 14 May 2022 14:29:36 +1200 Subject: [PATCH 2/2] Disable CI for now Signed-off-by: rlei-weta --- .github/workflows/build.yml | 236 ++++++++++++++++++------------------ 1 file changed, 118 insertions(+), 118 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index c4dfc9c..123470a 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -20,127 +20,127 @@ on: jobs: # A build job matrix based on pre-built USD binaries provided by NVIDIA. - nvidia-usd-binaries-linux-build: - strategy: - matrix: - usdVersion: - - 21.05 - include: - - usdVersion: 21.05 - usdVersionUrl: 21-05 - pythonVersion: 3.6 - USE_PYTHON_3: ON - buildType: Release - buildTests: 'ON' - runs-on: ubuntu-18.04 - name: 'Ubuntu 18.04 NVIDIA Pre-built Binaries - ' - steps: - - name: Install dependencies (Linux) - run: sudo apt-get install cmake python${{ matrix.pythonVersion }} python${{ matrix.pythonVersion }}-dev - - uses: actions/checkout@v2 - - name: Download and extract pre-built USD binaries - run: | - curl -L -o /tmp/usd-${{ matrix.usdVersion }}.7z https://developer.nvidia.com/usd-${{ matrix.usdVersionUrl }}-binary-linux-python-${{ matrix.pythonVersion }} - mkdir -p /tmp/usd-${{ matrix.usdVersion }} - 7z x /tmp/usd-${{ matrix.usdVersion }}.7z -o/tmp/usd-${{ matrix.usdVersion }} - - name: Create build directories - run: | - mkdir _build - mkdir _install - - name: Configure - run: | - cmake -DUSD_ROOT="/tmp/usd-${{ matrix.usdVersion }}/" \ - -DTBB_ROOT="/tmp/usd-${{ matrix.usdVersion }}/" \ - -DBOOST_ROOT="/tmp/usd-${{ matrix.usdVersion }}/" \ - -DUSE_PYTHON_3=${{ matrix.USE_PYTHON_3 }} \ - -DCMAKE_BUILD_TYPE=${{ matrix.buildType }} \ - -DBUILD_TESTING=${{ matrix.buildTests }} \ - -DCMAKE_CXX_FLAGS="-D_GLIBCXX_USE_CXX11_ABI=0" \ - -DCMAKE_INSTALL_PREFIX=../_install \ - .. - working-directory: _build - - name: Build - run: | - cmake --build . \ - --verbose \ - --target install \ - --config ${{ matrix.buildType }} - working-directory: _build - - name: Test - run: ctest -VV --output-on-failure -C ${{ matrix.buildType }} - working-directory: _build +# nvidia-usd-binaries-linux-build: +# strategy: +# matrix: +# usdVersion: +# - 21.05 +# include: +# - usdVersion: 21.05 +# usdVersionUrl: 21-05 +# pythonVersion: 3.6 +# USE_PYTHON_3: ON +# buildType: Release +# buildTests: 'ON' +# runs-on: ubuntu-18.04 +# name: 'Ubuntu 18.04 NVIDIA Pre-built Binaries +# ' +# steps: +# - name: Install dependencies (Linux) +# run: sudo apt-get install cmake python${{ matrix.pythonVersion }} python${{ matrix.pythonVersion }}-dev +# - uses: actions/checkout@v2 +# - name: Download and extract pre-built USD binaries +# run: | +# curl -L -o /tmp/usd-${{ matrix.usdVersion }}.7z https://developer.nvidia.com/usd-${{ matrix.usdVersionUrl }}-binary-linux-python-${{ matrix.pythonVersion }} +# mkdir -p /tmp/usd-${{ matrix.usdVersion }} +# 7z x /tmp/usd-${{ matrix.usdVersion }}.7z -o/tmp/usd-${{ matrix.usdVersion }} +# - name: Create build directories +# run: | +# mkdir _build +# mkdir _install +# - name: Configure +# run: | +# cmake -DUSD_ROOT="/tmp/usd-${{ matrix.usdVersion }}/" \ +# -DTBB_ROOT="/tmp/usd-${{ matrix.usdVersion }}/" \ +# -DBOOST_ROOT="/tmp/usd-${{ matrix.usdVersion }}/" \ +# -DUSE_PYTHON_3=${{ matrix.USE_PYTHON_3 }} \ +# -DCMAKE_BUILD_TYPE=${{ matrix.buildType }} \ +# -DBUILD_TESTING=${{ matrix.buildTests }} \ +# -DCMAKE_CXX_FLAGS="-D_GLIBCXX_USE_CXX11_ABI=0" \ +# -DCMAKE_INSTALL_PREFIX=../_install \ +# .. +# working-directory: _build +# - name: Build +# run: | +# cmake --build . \ +# --verbose \ +# --target install \ +# --config ${{ matrix.buildType }} +# working-directory: _build +# - name: Test +# run: ctest -VV --output-on-failure -C ${{ matrix.buildType }} +# working-directory: _build # A build job matrix based on pre-built USD binaries provided by NVIDIA on Windows. - nvidia-usd-binaries-windows-build: - strategy: - matrix: - usdVersion: - - 21.05 - include: - - usdVersion: 21.05 - usdVersionUrl: 21-05 - pythonVersion: 3.6 - USE_PYTHON_3: ON - buildType: Release - buildTests: ON - runs-on: windows-2016 - name: 'Windows 2016 NVIDIA Pre-built Binaries - ' - steps: - - uses: actions/checkout@v2 - - name: Set up Python ${{ matrix.pythonVersion }} - uses: actions/setup-python@v2 - with: - python-version: ${{ matrix.pythonVersion }} - - name: Download and extract pre-built USD binaries - run: | - Invoke-WebRequest https://developer.nvidia.com/usd-${{ matrix.usdVersionUrl }}-binary-windows-python-${{ matrix.pythonVersion }} -OutFile $env:TEMP/usd-${{ matrix.usdVersion }}.zip - mkdir -Force $env:TEMP/usd-${{ matrix.usdVersion }} - 7z x $env:TEMP/usd-${{ matrix.usdVersion }}.zip $("-o" + "$env:TEMP" + "\usd-${{ matrix.usdVersion }}") -y - - name: Create build directories - run: | - mkdir -Force _build - mkdir -Force _install - - name: Configure - run: | - cmake -DUSD_ROOT="$env:TEMP/usd-${{ matrix.usdVersion }}" ` - -DTBB_ROOT="$env:TEMP/usd-${{ matrix.usdVersion }}" ` - -DBOOST_ROOT="$env:TEMP/usd-${{ matrix.usdVersion }}" ` - -DUSE_PYTHON_3=${{ matrix.USE_PYTHON_3 }} ` - -DCMAKE_BUILD_TYPE=${{ matrix.buildType }} ` - -DBUILD_TESTING=${{ matrix.buildTests }} ` - -DCMAKE_INSTALL_PREFIX="../_install" ` - -G "Visual Studio 15 2017 Win64" ` - .. - working-directory: "_build" - - name: Build - run: | - cmake --build . ` - --verbose ` - --config ${{ matrix.buildType }} ` - --target ALL_BUILD - working-directory: "_build" - - name: Run Tests - run: | - ctest --extra-verbose ` - --output-on-failure ` - -C ${{ matrix.buildType }} - working-directory: "_build" - - name: Install - run: | - cmake --build . ` - --verbose ` - --config ${{ matrix.buildType }} ` - --target INSTALL - working-directory: "_build" +# nvidia-usd-binaries-windows-build: +# strategy: +# matrix: +# usdVersion: +# - 21.05 +# include: +# - usdVersion: 21.05 +# usdVersionUrl: 21-05 +# pythonVersion: 3.6 +# USE_PYTHON_3: ON +# buildType: Release +# buildTests: ON +# runs-on: windows-2016 +# name: 'Windows 2016 NVIDIA Pre-built Binaries +# ' +# steps: +# - uses: actions/checkout@v2 +# - name: Set up Python ${{ matrix.pythonVersion }} +# uses: actions/setup-python@v2 +# with: +# python-version: ${{ matrix.pythonVersion }} +# - name: Download and extract pre-built USD binaries +# run: | +# Invoke-WebRequest https://developer.nvidia.com/usd-${{ matrix.usdVersionUrl }}-binary-windows-python-${{ matrix.pythonVersion }} -OutFile $env:TEMP/usd-${{ matrix.usdVersion }}.zip +# mkdir -Force $env:TEMP/usd-${{ matrix.usdVersion }} +# 7z x $env:TEMP/usd-${{ matrix.usdVersion }}.zip $("-o" + "$env:TEMP" + "\usd-${{ matrix.usdVersion }}") -y +# - name: Create build directories +# run: | +# mkdir -Force _build +# mkdir -Force _install +# - name: Configure +# run: | +# cmake -DUSD_ROOT="$env:TEMP/usd-${{ matrix.usdVersion }}" ` +# -DTBB_ROOT="$env:TEMP/usd-${{ matrix.usdVersion }}" ` +# -DBOOST_ROOT="$env:TEMP/usd-${{ matrix.usdVersion }}" ` +# -DUSE_PYTHON_3=${{ matrix.USE_PYTHON_3 }} ` +# -DCMAKE_BUILD_TYPE=${{ matrix.buildType }} ` +# -DBUILD_TESTING=${{ matrix.buildTests }} ` +# -DCMAKE_INSTALL_PREFIX="../_install" ` +# -G "Visual Studio 15 2017 Win64" ` +# .. +# working-directory: "_build" +# - name: Build +# run: | +# cmake --build . ` +# --verbose ` +# --config ${{ matrix.buildType }} ` +# --target ALL_BUILD +# working-directory: "_build" +# - name: Run Tests +# run: | +# ctest --extra-verbose ` +# --output-on-failure ` +# -C ${{ matrix.buildType }} +# working-directory: "_build" +# - name: Install +# run: | +# cmake --build . ` +# --verbose ` +# --config ${{ matrix.buildType }} ` +# --target INSTALL +# working-directory: "_build" # Run automated code formatting checks. code-formatting-check: