Add Draco to cmakelists

Initial pass. Not yet used.
Add Draco library to assimp build and link
This commit is contained in:
RichardTea
2021-01-22 16:31:59 +00:00
parent deac3a9f6c
commit 3a7d0f5656
3 changed files with 62 additions and 1 deletions

View File

@@ -1117,6 +1117,11 @@ IF (ASSIMP_BUILD_NONFREE_C4D_IMPORTER)
INCLUDE_DIRECTORIES(${C4D_INCLUDES})
ENDIF ()
IF (ASSIMP_BUILD_DRACO)
INCLUDE_DIRECTORIES(${draco_INCLUDE_DIRS})
ADD_DEFINITIONS( -DASSIMP_ENABLE_DRACO )
ENDIF()
ADD_LIBRARY( assimp ${assimp_src} )
ADD_LIBRARY(assimp::assimp ALIAS assimp)
@@ -1149,7 +1154,7 @@ IF(ASSIMP_HUNTER_ENABLED)
pugixml
)
ELSE()
TARGET_LINK_LIBRARIES(assimp ${ZLIB_LIBRARIES} ${OPENDDL_PARSER_LIBRARIES} )
TARGET_LINK_LIBRARIES(assimp ${ZLIB_LIBRARIES} ${OPENDDL_PARSER_LIBRARIES})
ENDIF()
if(ASSIMP_ANDROID_JNIIOSYSTEM)
@@ -1164,6 +1169,10 @@ IF (ASSIMP_BUILD_NONFREE_C4D_IMPORTER)
TARGET_LINK_LIBRARIES(assimp ${C4D_EXTRA_LIBRARIES})
ENDIF ()
IF (ASSIMP_BUILD_DRACO)
target_link_libraries(assimp draco)
ENDIF()
if( MSVC )
# in order to prevent DLL hell, each of the DLLs have to be suffixed with the major version and msvc prefix
# CMake 3.12 added a variable for this