Draco platform libraries have different names
On Windows it's draco.dll/lib On Linux/macOS draco_shared.dylib & draco_static.libpull/3614/head
parent
c917e6513f
commit
fe97ff6474
|
@ -590,18 +590,28 @@ IF ( ASSIMP_BUILD_DRACO )
|
||||||
ENDIF()
|
ENDIF()
|
||||||
ADD_SUBDIRECTORY( "contrib/draco" )
|
ADD_SUBDIRECTORY( "contrib/draco" )
|
||||||
|
|
||||||
|
if(MSVC OR WIN32)
|
||||||
|
set(draco_LIBRARIES "draco")
|
||||||
|
else()
|
||||||
|
if(BUILD_SHARED_LIBS)
|
||||||
|
set(draco_LIBRARIES "draco_shared")
|
||||||
|
else()
|
||||||
|
set(draco_LIBRARIES "draco_static")
|
||||||
|
endif()
|
||||||
|
endif()
|
||||||
|
|
||||||
# Don't build the draco command-line tools by default
|
# Don't build the draco command-line tools by default
|
||||||
set_target_properties(draco_encoder draco_decoder PROPERTIES EXCLUDE_FROM_ALL TRUE)
|
set_target_properties(draco_encoder draco_decoder PROPERTIES EXCLUDE_FROM_ALL TRUE)
|
||||||
set_target_properties(draco_encoder draco_decoder PROPERTIES EXCLUDE_FROM_DEFAULT_BUILD TRUE)
|
set_target_properties(draco_encoder draco_decoder PROPERTIES EXCLUDE_FROM_DEFAULT_BUILD TRUE)
|
||||||
|
|
||||||
TARGET_USE_COMMON_OUTPUT_DIRECTORY(draco)
|
TARGET_USE_COMMON_OUTPUT_DIRECTORY(${draco_LIBRARIES})
|
||||||
TARGET_USE_COMMON_OUTPUT_DIRECTORY(draco_encoder)
|
TARGET_USE_COMMON_OUTPUT_DIRECTORY(draco_encoder)
|
||||||
TARGET_USE_COMMON_OUTPUT_DIRECTORY(draco_decoder)
|
TARGET_USE_COMMON_OUTPUT_DIRECTORY(draco_decoder)
|
||||||
|
|
||||||
set(draco_INCLUDE_DIRS "${CMAKE_CURRENT_SOURCE_DIR}/contrib/draco/src")
|
set(draco_INCLUDE_DIRS "${CMAKE_CURRENT_SOURCE_DIR}/contrib/draco/src")
|
||||||
|
|
||||||
# This is probably wrong
|
# This is probably wrong
|
||||||
INSTALL( TARGETS draco
|
INSTALL( TARGETS ${draco_LIBRARIES}
|
||||||
EXPORT "${TARGETS_EXPORT_NAME}"
|
EXPORT "${TARGETS_EXPORT_NAME}"
|
||||||
LIBRARY DESTINATION ${ASSIMP_LIB_INSTALL_DIR}
|
LIBRARY DESTINATION ${ASSIMP_LIB_INSTALL_DIR}
|
||||||
ARCHIVE DESTINATION ${ASSIMP_LIB_INSTALL_DIR}
|
ARCHIVE DESTINATION ${ASSIMP_LIB_INSTALL_DIR}
|
||||||
|
|
|
@ -1174,7 +1174,7 @@ IF (ASSIMP_BUILD_NONFREE_C4D_IMPORTER)
|
||||||
ENDIF ()
|
ENDIF ()
|
||||||
|
|
||||||
IF (ASSIMP_BUILD_DRACO)
|
IF (ASSIMP_BUILD_DRACO)
|
||||||
target_link_libraries(assimp draco)
|
target_link_libraries(assimp ${draco_LIBRARIES})
|
||||||
ENDIF()
|
ENDIF()
|
||||||
|
|
||||||
if( MSVC )
|
if( MSVC )
|
||||||
|
|
Loading…
Reference in New Issue