Skip to content

Commit

Permalink
Port usdzip to c++ with CLI11 (depends on #2107)
Browse files Browse the repository at this point in the history
  • Loading branch information
dgovil committed Nov 28, 2022
1 parent 3b5b354 commit 3d34f41
Show file tree
Hide file tree
Showing 4 changed files with 377 additions and 245 deletions.
18 changes: 8 additions & 10 deletions pxr/usd/bin/usdzip/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,10 +1,15 @@
set(PXR_PREFIX pxr/usd)
set(PXR_PACKAGE usd)

pxr_python_bin(usdzip
DEPENDENCIES
pxr_cpp_bin(usdzip
LIBRARIES
ar
arch
sdf
tf
usd
)
usdUtils
)

pxr_install_test_dir(
SRC testenv/testUsdZipInputFiles
Expand All @@ -22,7 +27,6 @@ pxr_install_test_dir(
)

pxr_register_test(testUsdZipInputFiles
PYTHON
COMMAND "${CMAKE_INSTALL_PREFIX}/bin/usdzip flat.usdz src -l flat.txt"
DIFF_COMPARE flat.txt
EXPECTED_RETURN_CODE 0
Expand All @@ -34,7 +38,6 @@ pxr_install_test_dir(
)

pxr_register_test(testUsdZipInputFiles2
PYTHON
COMMAND "${CMAKE_INSTALL_PREFIX}/bin/usdzip -r recursive.usdz src -l recursive.txt"
DIFF_COMPARE recursive.txt
EXPECTED_RETURN_CODE 0
Expand All @@ -46,7 +49,6 @@ pxr_install_test_dir(
)

pxr_register_test(testUsdZipInputFiles3
PYTHON
COMMAND "${CMAKE_INSTALL_PREFIX}/bin/usdzip flat_inputs.usdz src/a.txt src/b.png"
EXPECTED_RETURN_CODE 0
)
Expand All @@ -57,26 +59,22 @@ pxr_install_test_dir(
)

pxr_register_test(testUsdZipInputFiles4
PYTHON
COMMAND "${CMAKE_INSTALL_PREFIX}/bin/usdzip recursive_inputs.usdz src/a.txt src/b.png src/sub"
EXPECTED_RETURN_CODE 0
)

pxr_register_test(testUsdZipMissingInput
PYTHON
COMMAND "${CMAKE_INSTALL_PREFIX}/bin/usdzip nonexistent.usdz nonexistent.usd"
EXPECTED_RETURN_CODE 1
)

pxr_register_test(testUsdZipAsset
PYTHON
COMMAND "${CMAKE_INSTALL_PREFIX}/bin/usdzip -a root.usd package.usdz -l contents.txt"
DIFF_COMPARE contents.txt
EXPECTED_RETURN_CODE 0
)

pxr_register_test(testUsdZipARKitAsset
PYTHON
COMMAND "${CMAKE_INSTALL_PREFIX}/bin/usdzip --arkitAsset root.usd package.usdz -l contents_arkit.txt"
DIFF_COMPARE contents_arkit.txt
EXPECTED_RETURN_CODE 0
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
src/a.txt
src/b.png
src/sub/c.png
src/sub/d.txt
src/sub/c.png
Loading

0 comments on commit 3d34f41

Please sign in to comment.