|
@@ -953,24 +953,27 @@ ELSE()
|
|
|
ENDIF()
|
|
|
|
|
|
# zip (https://github.com/kuba--/zip)
|
|
|
-IF(ASSIMP_HUNTER_ENABLED)
|
|
|
- hunter_add_package(zip)
|
|
|
- find_package(zip CONFIG REQUIRED)
|
|
|
-ELSE()
|
|
|
- SET( ziplib_SRCS
|
|
|
- ../contrib/zip/src/miniz.h
|
|
|
- ../contrib/zip/src/zip.c
|
|
|
- ../contrib/zip/src/zip.h
|
|
|
- )
|
|
|
+separate_arguments(ASSIMP_EXPORTERS_LIST UNIX_COMMAND ${ASSIMP_EXPORTERS_ENABLED})
|
|
|
+IF(3MF IN_LIST ASSIMP_EXPORTERS_LIST)
|
|
|
+ IF(ASSIMP_HUNTER_ENABLED)
|
|
|
+ hunter_add_package(zip)
|
|
|
+ find_package(zip CONFIG REQUIRED)
|
|
|
+ ELSE()
|
|
|
+ SET( ziplib_SRCS
|
|
|
+ ../contrib/zip/src/miniz.h
|
|
|
+ ../contrib/zip/src/zip.c
|
|
|
+ ../contrib/zip/src/zip.h
|
|
|
+ )
|
|
|
|
|
|
- # TODO if cmake required version has been updated to >3.12.0, collapse this to the second case only
|
|
|
- if(${CMAKE_VERSION} VERSION_LESS "3.12.0")
|
|
|
- add_definitions(-DMINIZ_USE_UNALIGNED_LOADS_AND_STORES=0)
|
|
|
- else()
|
|
|
- add_compile_definitions(MINIZ_USE_UNALIGNED_LOADS_AND_STORES=0)
|
|
|
- endif()
|
|
|
+ # TODO if cmake required version has been updated to >3.12.0, collapse this to the second case only
|
|
|
+ if(${CMAKE_VERSION} VERSION_LESS "3.12.0")
|
|
|
+ add_definitions(-DMINIZ_USE_UNALIGNED_LOADS_AND_STORES=0)
|
|
|
+ else()
|
|
|
+ add_compile_definitions(MINIZ_USE_UNALIGNED_LOADS_AND_STORES=0)
|
|
|
+ endif()
|
|
|
|
|
|
- SOURCE_GROUP( ziplib FILES ${ziplib_SRCS} )
|
|
|
+ SOURCE_GROUP( ziplib FILES ${ziplib_SRCS} )
|
|
|
+ ENDIF()
|
|
|
ENDIF()
|
|
|
|
|
|
# openddlparser
|
|
@@ -1186,10 +1189,12 @@ IF(ASSIMP_HUNTER_ENABLED)
|
|
|
ZLIB::zlib
|
|
|
RapidJSON::rapidjson
|
|
|
utf8cpp
|
|
|
- zip::zip
|
|
|
pugixml
|
|
|
stb::stb
|
|
|
)
|
|
|
+ if(TARGET zip::zip)
|
|
|
+ target_link_libraries(assimp PUBLIC zip::zip)
|
|
|
+ endif()
|
|
|
|
|
|
if (ASSIMP_BUILD_DRACO)
|
|
|
target_link_libraries(assimp PUBLIC ${draco_LIBRARIES})
|