glTF: add Draco shared library for mesh compression.

Draco is added as a library under extern/ and builds a shared library that is
installed into the Python site-packages. This is then loaded by the glTF add-on
to do mesh compression.

Differential Revision: https://developer.blender.org/D4501
This commit is contained in:
Benjamin Schmithüsen
2019-04-11 11:26:23 +02:00
committed by Brecht Van Lommel
parent a9d6356fee
commit 4bad4bfc6a
350 changed files with 41438 additions and 0 deletions

View File

@@ -633,6 +633,13 @@ if(UNIX AND NOT APPLE)
endif()
endif()
if(WITH_DRACO)
install(
PROGRAMS ${CMAKE_BINARY_DIR}/lib/lib${DRACO_LIB_NAME}.so
DESTINATION ${TARGETDIR_VER}/python/lib/python${PYTHON_VERSION}/site-packages
)
endif()
elseif(WIN32)
set(BLENDER_TEXT_FILES_DESTINATION ".")
@@ -832,6 +839,12 @@ elseif(WIN32)
DESTINATION "."
)
if(WITH_DRACO)
install(
PROGRAMS ${CMAKE_BINARY_DIR}/lib/$<CONFIG>/${DRACO_LIB_NAME}.dll
DESTINATION ${TARGETDIR_VER}/python/lib/site-packages
)
endif()
elseif(APPLE)
# handy install macro to exclude files, we use \$ escape for the "to"
@@ -936,6 +949,12 @@ elseif(APPLE)
unset(_py_inc_suffix)
endif()
if(WITH_DRACO)
install(
PROGRAMS ${CMAKE_BINARY_DIR}/lib/lib${DRACO_LIB_NAME}.dylib
DESTINATION ${TARGETDIR_VER}/python/lib/python${PYTHON_VERSION}/site-packages
)
endif()
endif()
# -----------------------------------------------------------------------------