# Asset Importer
# https://github.com/assimp/assimp

include(FetchContent)

FetchContent_Declare(assimp
  URL     ${CMAKE_CURRENT_LIST_DIR}/assimp-5.0.1.zip
  URL_MD5 11595546066ce52c0039818b8599f38b
)

FetchContent_GetProperties(assimp)
if(NOT assimp_POPULATED)
  FetchContent_Populate(assimp)

  set(ASSIMP_BUILD_ALL_IMPORTERS_BY_DEFAULT OFF)
  set(ASSIMP_BUILD_ALL_EXPORTERS_BY_DEFAULT OFF)
  set(ASSIMP_BUILD_COLLADA_IMPORTER ON)
  set(ASSIMP_BUILD_COLLADA_EXPORTER ON)
  set(ASSIMP_BUILD_ASSIMP_TOOLS OFF)
  set(ASSIMP_BUILD_TESTS OFF)
  set(INJECT_DEBUG_POSTFIX OFF)
  set(BUILD_SHARED_LIBS OFF)

  add_subdirectory(${assimp_SOURCE_DIR} ${assimp_BINARY_DIR} EXCLUDE_FROM_ALL)
endif()

