From: Luca Heltai Date: Sat, 16 Sep 2017 06:35:11 +0000 (+0200) Subject: Added assimp detection. X-Git-Tag: v9.0.0-rc1~1050^2~7 X-Git-Url: https://gitweb.dealii.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=12f56a307f9ffb9f877c79d3bdb996b935b0f425;p=dealii.git Added assimp detection. --- diff --git a/cmake/configure/configure_assimp.cmake b/cmake/configure/configure_assimp.cmake new file mode 100644 index 0000000000..90b404ddd8 --- /dev/null +++ b/cmake/configure/configure_assimp.cmake @@ -0,0 +1,20 @@ +## --------------------------------------------------------------------- +## +## Copyright (C) 2017 by the deal.II authors +## +## This file is part of the deal.II library. +## +## The deal.II library is free software; you can use it, redistribute +## it, and/or modify it under the terms of the GNU Lesser General +## Public License as published by the Free Software Foundation; either +## version 2.1 of the License, or (at your option) any later version. +## The full text of the license can be found in the file LICENSE at +## the top level of the deal.II distribution. +## +## --------------------------------------------------------------------- + +# +# Configuration for the ASSIMP library: +# + +CONFIGURE_FEATURE(ASSIMP) diff --git a/cmake/modules/FindASSIMP.cmake b/cmake/modules/FindASSIMP.cmake new file mode 100644 index 0000000000..e5a3a2462f --- /dev/null +++ b/cmake/modules/FindASSIMP.cmake @@ -0,0 +1,46 @@ +## --------------------------------------------------------------------- +## +## Copyright (C) 2017 by the deal.II authors +## +## This file is part of the deal.II library. +## +## The deal.II library is free software; you can use it, redistribute +## it, and/or modify it under the terms of the GNU Lesser General +## Public License as published by the Free Software Foundation; either +## version 2.1 of the License, or (at your option) any later version. +## The full text of the license can be found in the file LICENSE at +## the top level of the deal.II distribution. +## +## --------------------------------------------------------------------- + +# +# Try to find the ASSIMP libraries +# +# This module exports +# +# ASSIMP_LIBRARIES +# ASSIMP_INCLUDE_DIRS +# + +SET(ASSIMP_DIR "" CACHE PATH "An optional hint to a Assimp installation") +SET_IF_EMPTY(ASSIMP_DIR "$ENV{ASSIMP_DIR}") + +DEAL_II_FIND_LIBRARY(ASSIMP_LIB NAMES assimp + HINTS ${ASSIMP_DIR} + PATH_SUFFIXES lib${LIB_SUFFIX} lib64 lib + ) + +SET(ASSIMP_INC "${ASSIMP_DIR}/include") + +DEAL_II_PACKAGE_HANDLE(ASSIMP + LIBRARIES REQUIRED + ASSIMP_LIB + INCLUDE_DIRS + REQUIRED ASSIMP_INC + USER_INCLUDE_DIRS + REQUIRED ASSIMP_INC + CLEAR + ASSIMP_LIB + ASSIMP_INC + ) + diff --git a/doc/news/changes/major/20170916LucaHeltai b/doc/news/changes/major/20170916LucaHeltai new file mode 100644 index 0000000000..d4073bafe7 --- /dev/null +++ b/doc/news/changes/major/20170916LucaHeltai @@ -0,0 +1,8 @@ +New: Added support for the Open Asset Import Library (Assimp) +(http://assimp.sourceforge.net/). This library can be used +to read about 40 different 3D graphics formats, used in 3D +modelers (such as Blender, Maya, etc.). Some of these formats +contain mesh information, that in turn can be read +into deal.II Triangulation<2,3> objects. +
+(Luca Heltai, 2017/09/16) diff --git a/include/deal.II/base/config.h.in b/include/deal.II/base/config.h.in index 92212d903a..22ddfefa55 100644 --- a/include/deal.II/base/config.h.in +++ b/include/deal.II/base/config.h.in @@ -37,6 +37,7 @@ #cmakedefine DEAL_II_WITH_64BIT_INDICES #cmakedefine DEAL_II_WITH_ADOLC #cmakedefine DEAL_II_WITH_ARPACK +#cmakedefine DEAL_II_WITH_ASSIMP #cmakedefine DEAL_II_WITH_BZIP2 #cmakedefine DEAL_II_WITH_CUDA #cmakedefine DEAL_II_WITH_CXX14