Moved InitFromFile() from Geometry to MeshLoader, added MeshLoader function for USD files, added tinyusdz library

This commit is contained in:
Vladyslav Baranovskyi
2024-08-29 21:01:42 +03:00
parent f70adcbd7f
commit 380e0f323d
7 changed files with 215 additions and 85 deletions

View File

@@ -40,3 +40,4 @@ if(ENABLE_TEST)
add_subdirectory(catch2)
endif()
add_subdirectory(tinyusdz)

22
3rdParty/tinyusdz/CMakeLists.txt vendored Normal file
View File

@@ -0,0 +1,22 @@
include(Utils)
include(FetchContent)
message("-- Building TinyUSDZ")
FetchContent_Declare(
tinyusdz
GIT_REPOSITORY https://github.com/syoyo/tinyusdz.git
GIT_TAG v0.8.0rc8
GIT_SHALLOW TRUE
CMAKE_ARGS
-DCMAKE_INSTALL_PREFIX:PATH=${CMAKE_BINARY_DIR}/INSTALL
-DCMAKE_BUILD_TYPE:STRING=Release
-DTINYUSDZ_BUILD_TESTS:BOOL=OFF
-DTINYUSDZ_BUILD_EXAMPLES:BOOL=OFF
)
FetchContent_MakeAvailable(tinyusdz)
function (LinkTinyUSDZ TARGET)
target_include_directories(${TARGET} PRIVATE ${tinyusdz_SOURCE_DIR}/src)
target_link_libraries(${TARGET} PRIVATE tinyusdz_static)
endfunction ()