diff --git a/.github/FUNDING.yml b/.github/FUNDING.yml
index a932e5377..e0c2bec9e 100644
--- a/.github/FUNDING.yml
+++ b/.github/FUNDING.yml
@@ -1,2 +1,2 @@
patreon: assimp
-Paypal: https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=4JRJVPXC4QJM4
+custom: https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=4JRJVPXC4QJM4
diff --git a/.github/ISSUE_TEMPLATE/bug_report.md b/.github/ISSUE_TEMPLATE/bug_report.md
new file mode 100644
index 000000000..dd84ea782
--- /dev/null
+++ b/.github/ISSUE_TEMPLATE/bug_report.md
@@ -0,0 +1,38 @@
+---
+name: Bug report
+about: Create a report to help us improve
+title: ''
+labels: ''
+assignees: ''
+
+---
+
+**Describe the bug**
+A clear and concise description of what the bug is.
+
+**To Reproduce**
+Steps to reproduce the behavior:
+1. Go to '...'
+2. Click on '....'
+3. Scroll down to '....'
+4. See error
+
+**Expected behavior**
+A clear and concise description of what you expected to happen.
+
+**Screenshots**
+If applicable, add screenshots to help explain your problem.
+
+**Desktop (please complete the following information):**
+ - OS: [e.g. iOS]
+ - Browser [e.g. chrome, safari]
+ - Version [e.g. 22]
+
+**Smartphone (please complete the following information):**
+ - Device: [e.g. iPhone6]
+ - OS: [e.g. iOS8.1]
+ - Browser [e.g. stock browser, safari]
+ - Version [e.g. 22]
+
+**Additional context**
+Add any other context about the problem here.
diff --git a/.github/ISSUE_TEMPLATE/feature_request.md b/.github/ISSUE_TEMPLATE/feature_request.md
new file mode 100644
index 000000000..bbcbbe7d6
--- /dev/null
+++ b/.github/ISSUE_TEMPLATE/feature_request.md
@@ -0,0 +1,20 @@
+---
+name: Feature request
+about: Suggest an idea for this project
+title: ''
+labels: ''
+assignees: ''
+
+---
+
+**Is your feature request related to a problem? Please describe.**
+A clear and concise description of what the problem is. Ex. I'm always frustrated when [...]
+
+**Describe the solution you'd like**
+A clear and concise description of what you want to happen.
+
+**Describe alternatives you've considered**
+A clear and concise description of any alternative solutions or features you've considered.
+
+**Additional context**
+Add any other context or screenshots about the feature request here.
diff --git a/.github/workflows/ccpp.yml b/.github/workflows/ccpp.yml
index 61e804b2e..f29e2e500 100644
--- a/.github/workflows/ccpp.yml
+++ b/.github/workflows/ccpp.yml
@@ -7,16 +7,117 @@ on:
branches: [ master ]
jobs:
- build-ubuntu:
+ job:
+ name: ${{ matrix.name }}-build-and-test
+ runs-on: ${{ matrix.os }}
+ strategy:
+ fail-fast: false
+ matrix:
+ name: [ubuntu-latest-g++, macos-latest-clang++, windows-latest-cl.exe, ubuntu-latest-clang++, ubuntu-gcc-hunter, macos-clang-hunter, windows-msvc-hunter]
+ # For Windows msvc, for Linux and macOS let's use the clang compiler, use gcc for Linux.
+ include:
+ - name: windows-latest-cl.exe
+ os: windows-latest
+ cxx: cl.exe
+ cc: cl.exe
+ - name: ubuntu-latest-clang++
+ os: ubuntu-latest
+ cxx: clang++
+ cc: clang
+ - name: macos-latest-clang++
+ os: macos-latest
+ cxx: clang++
+ cc: clang
+ - name: ubuntu-latest-g++
+ os: ubuntu-latest
+ cxx: g++
+ cc: gcc
+ - name: ubuntu-gcc-hunter
+ os: ubuntu-latest
+ toolchain: ninja-gcc-cxx17-fpic
+ - name: macos-clang-hunter
+ os: macos-latest
+ toolchain: ninja-clang-cxx17-fpic
+ - name: windows-msvc-hunter
+ os: windows-latest
+ toolchain: ninja-vs-win64-cxx17
- runs-on: ubuntu-latest
-
steps:
- - uses: actions/checkout@v1
- - name: configure
- run: cmake CMakeLists.txt
- - name: build
- run: cmake --build .
+ - uses: actions/checkout@v2
+
+ - uses: lukka/get-cmake@latest
+
+ - uses: ilammy/msvc-dev-cmd@v1
+
+ - name: Set Compiler Environment
+ if: "!endsWith(matrix.name, 'hunter')"
+ uses: lukka/set-shell-env@v1
+ with:
+ CXX: ${{ matrix.cxx }}
+ CC: ${{ matrix.cc }}
+
+ - name: Set Compiler Environment for Hunter on Windows
+ if: startsWith(matrix.name, 'windows') && endsWith(matrix.name, 'hunter')
+ uses: lukka/set-shell-env@v1
+ with:
+ VS160COMNTOOLS: C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\Common7\Tools
+
+ - name: Checkout Hunter toolchains
+ if: endsWith(matrix.name, 'hunter')
+ uses: actions/checkout@v2
+ with:
+ repository: cpp-pm/polly
+ path: cmake/polly
+
+ - name: Cache DX SDK
+ id: dxcache
+ if: contains(matrix.name, 'windows')
+ uses: actions/cache@v2
+ with:
+ path: '${{ github.workspace }}/DX_SDK'
+ key: ${{ runner.os }}-DX_SDK
+ restore-keys: |
+ ${{ runner.os }}-DX_SDK
+
+ - name: Download DXSetup
+ if: contains(matrix.name, 'windows') && steps.dxcache.outputs.cache-hit != 'true'
+ run: |
+ curl -s -o DXSDK_Jun10.exe --location https://download.microsoft.com/download/A/E/7/AE743F1F-632B-4809-87A9-AA1BB3458E31/DXSDK_Jun10.exe
+ cmd.exe /c start /wait .\DXSDK_Jun10.exe /U /O /F /S /P "${{ github.workspace }}\DX_SDK"
+
+ - name: Set Windows specific CMake arguments
+ if: contains(matrix.name, 'windows')
+ id: windows_extra_cmake_args
+ run: echo "::set-output name=args::-DASSIMP_BUILD_ASSIMP_TOOLS=1 -DASSIMP_BUILD_ASSIMP_VIEW=1"
+
+ - name: Set Hunter specific CMake arguments
+ if: contains(matrix.name, 'hunter')
+ id: hunter_extra_cmake_args
+ run: echo "::set-output name=args::-DBUILD_SHARED_LIBS=OFF -DASSIMP_HUNTER_ENABLED=ON -DCMAKE_TOOLCHAIN_FILE=${{ github.workspace }}/cmake/polly/${{ matrix.toolchain }}.cmake"
+
+ - name: configure and build
+ uses: lukka/run-cmake@v3
+ env:
+ DXSDK_DIR: '${{ github.workspace }}/DX_SDK'
+
+ with:
+ cmakeListsOrSettingsJson: CMakeListsTxtAdvanced
+ cmakeListsTxtPath: '${{ github.workspace }}/CMakeLists.txt'
+ cmakeAppendedArgs: '-GNinja -DCMAKE_BUILD_TYPE=Release ${{ steps.windows_extra_cmake_args.outputs.args }} ${{ steps.hunter_extra_cmake_args.outputs.args }}'
+ buildWithCMakeArgs: '-- -v'
+ buildDirectory: '${{ github.workspace }}/build/'
+
+ - name: Exclude certain tests in Hunter specific builds
+ if: contains(matrix.name, 'hunter')
+ id: hunter_extra_test_args
+ run: echo "::set-output name=args::--gtest_filter=-utOpenGEXImportExport.Importissue1340_EmptyCameraObject:utColladaZaeImportExport.importBlenFromFileTest"
+
- name: test
- run: cd bin && ./unit
-
+ run: cd build/bin && ./unit ${{ steps.hunter_extra_test_args.outputs.args }}
+ shell: bash
+
+ - uses: actions/upload-artifact@v2
+ if: matrix.name == 'windows-msvc'
+ with:
+ name: 'assimp-bins-${{ matrix.name }}-${{ github.sha }}'
+ path: build/bin
diff --git a/.github/workflows/sanitizer.yml b/.github/workflows/sanitizer.yml
new file mode 100644
index 000000000..e2cb1cf53
--- /dev/null
+++ b/.github/workflows/sanitizer.yml
@@ -0,0 +1,56 @@
+name: C/C++ Sanitizer
+
+on:
+ push:
+ branches: [ master ]
+ pull_request:
+ branches: [ master ]
+
+jobs:
+ job1:
+ name: adress-sanitizer
+ runs-on: ubuntu-latest
+ steps:
+ - uses: actions/checkout@v2
+ - uses: lukka/get-cmake@latest
+ - uses: lukka/set-shell-env@v1
+ with:
+ CXX: clang++
+ CC: clang
+
+ - name: configure and build
+ uses: lukka/run-cmake@v3
+ with:
+ cmakeListsOrSettingsJson: CMakeListsTxtAdvanced
+ cmakeListsTxtPath: '${{ github.workspace }}/CMakeLists.txt'
+ cmakeAppendedArgs: '-GNinja -DCMAKE_BUILD_TYPE=Debug -DASSIMP_ASAN=ON'
+ buildWithCMakeArgs: '-- -v'
+ buildDirectory: '${{ github.workspace }}/build/'
+
+ - name: test
+ run: cd build/bin && ./unit
+ shell: bash
+
+ job2:
+ name: undefined-behavior-sanitizer
+ runs-on: ubuntu-latest
+ steps:
+ - uses: actions/checkout@v2
+ - uses: lukka/get-cmake@latest
+ - uses: lukka/set-shell-env@v1
+ with:
+ CXX: clang++
+ CC: clang
+
+ - name: configure and build
+ uses: lukka/run-cmake@v2
+ with:
+ cmakeListsOrSettingsJson: CMakeListsTxtAdvanced
+ cmakeListsTxtPath: '${{ github.workspace }}/CMakeLists.txt'
+ cmakeAppendedArgs: '-GNinja -DCMAKE_BUILD_TYPE=Debug -DASSIMP_UBSAN=ON'
+ buildWithCMakeArgs: '-- -v'
+ buildDirectory: '${{ github.workspace }}/build/'
+
+ - name: test
+ run: cd build/bin && ./unit
+ shell: bash
diff --git a/.gitignore b/.gitignore
index e975976bf..fe59f9a70 100644
--- a/.gitignore
+++ b/.gitignore
@@ -79,6 +79,12 @@ test/gtest/src/gtest-stamp/Debug/
tools/assimp_view/assimp_viewer.vcxproj.user
*.pyc
+### Rust ###
+# Generated by Cargo; will have compiled files and executables
+port/assimp_rs/target/
+# Backup files generated by rustfmt
+port/assimp_rs/**/*.rs.bk
+
# Unix editor backups
*~
test/gtest/src/gtest-stamp/gtest-gitinfo.txt
diff --git a/AssimpBuildTreeSettings.cmake.in b/AssimpBuildTreeSettings.cmake.in
deleted file mode 100644
index 342da1b08..000000000
--- a/AssimpBuildTreeSettings.cmake.in
+++ /dev/null
@@ -1,3 +0,0 @@
-set(ASSIMP_INCLUDE_DIRS
- "@PROJECT_SOURCE_DIR@"
- "@PROJECT_BINARY_DIR@")
diff --git a/AssimpConfigVersion.cmake.in b/AssimpConfigVersion.cmake.in
deleted file mode 100644
index 701fa6158..000000000
--- a/AssimpConfigVersion.cmake.in
+++ /dev/null
@@ -1,11 +0,0 @@
-set(ASSIMP_PACKAGE_VERSION "@ASSIMP_SOVERSION@")
-
-# Check whether the requested PACKAGE_FIND_VERSION is compatible
-if("${ASSIMP_PACKAGE_VERSION}" VERSION_LESS "${ASSIMP_PACKAGE_FIND_VERSION}")
- set(ASSIMP_PACKAGE_VERSION_COMPATIBLE FALSE)
-else()
- set(ASSIMP_PACKAGE_VERSION_COMPATIBLE TRUE)
- if ("${ASSIMP_PACKAGE_VERSION}" VERSION_EQUAL "${ASSIMP_PACKAGE_FIND_VERSION}")
- set(ASSIMP_PACKAGE_VERSION_EXACT TRUE)
- endif()
-endif()
diff --git a/CMakeLists.txt b/CMakeLists.txt
index f01ea52ea..4b553ef9e 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -34,18 +34,20 @@
# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
#----------------------------------------------------------------------
+SET(CMAKE_POLICY_DEFAULT_CMP0012 NEW)
SET(CMAKE_POLICY_DEFAULT_CMP0074 NEW)
+SET(CMAKE_POLICY_DEFAULT_CMP0092 NEW)
CMAKE_MINIMUM_REQUIRED( VERSION 3.0 )
# Toggles the use of the hunter package manager
-option(HUNTER_ENABLED "Enable Hunter package manager support" OFF)
+option(ASSIMP_HUNTER_ENABLED "Enable Hunter package manager support" OFF)
-IF(HUNTER_ENABLED)
+IF(ASSIMP_HUNTER_ENABLED)
include("cmake/HunterGate.cmake")
HunterGate(
- URL "https://github.com/ruslo/hunter/archive/v0.23.176.tar.gz"
- SHA1 "2e9ae973d028660b735ac4c6142725ca36a0048a"
+ URL "https://github.com/cpp-pm/hunter/archive/v0.23.269.tar.gz"
+ SHA1 "64024b7b95b4c86d50ae05b926814448c93a70a0"
)
add_definitions(-DASSIMP_USE_HUNTER)
@@ -60,7 +62,7 @@ OPTION( BUILD_SHARED_LIBS
ON
)
-OPTION( BUILD_FRAMEWORK
+OPTION( ASSIMP_BUILD_FRAMEWORK
"Build package as Mac OS X Framework bundle."
OFF
)
@@ -101,17 +103,13 @@ OPTION ( ASSIMP_COVERALLS
OFF
)
OPTION( ASSIMP_INSTALL
- "DIsable this if you want to use assimp as a submodule."
+ "Disable this if you want to use assimp as a submodule."
ON
)
OPTION ( ASSIMP_ERROR_MAX
"Enable all warnings."
OFF
)
-OPTION ( ASSIMP_WERROR
- "Treat warnings as errors."
- OFF
-)
OPTION ( ASSIMP_ASAN
"Enable AddressSanitizer."
OFF
@@ -120,25 +118,27 @@ OPTION ( ASSIMP_UBSAN
"Enable Undefined Behavior sanitizer."
OFF
)
-OPTION ( SYSTEM_IRRXML
- "Use system installed Irrlicht/IrrXML library."
- OFF
-)
-OPTION ( BUILD_DOCS
+OPTION ( ASSIMP_BUILD_DOCS
"Build documentation using Doxygen."
OFF
)
-OPTION( INJECT_DEBUG_POSTFIX
+OPTION( ASSIMP_INJECT_DEBUG_POSTFIX
"Inject debug postfix in .a/.so/.dll lib names"
ON
)
-OPTION ( IGNORE_GIT_HASH
+OPTION ( ASSIMP_IGNORE_GIT_HASH
"Don't call git to get the hash."
OFF
)
-IF (IOS AND NOT HUNTER_ENABLED)
+IF ( WIN32 )
+ OPTION ( ASSIMP_BUILD_ASSIMP_VIEW
+ "If the Assimp view tool is built. (requires DirectX)"
+ OFF )
+ENDIF()
+
+IF (IOS AND NOT ASSIMP_HUNTER_ENABLED)
IF (NOT CMAKE_BUILD_TYPE)
SET(CMAKE_BUILD_TYPE "Release")
ENDIF ()
@@ -161,7 +161,7 @@ IF(MSVC)
ENDIF()
ENDIF()
-IF (BUILD_FRAMEWORK)
+IF (ASSIMP_BUILD_FRAMEWORK)
SET (BUILD_SHARED_LIBS ON)
MESSAGE(STATUS "Framework bundle building enabled")
ENDIF()
@@ -181,12 +181,12 @@ SET (ASSIMP_VERSION ${ASSIMP_VERSION_MAJOR}.${ASSIMP_VERSION_MINOR}.${ASSIMP_VER
SET (ASSIMP_SOVERSION 5)
SET( ASSIMP_PACKAGE_VERSION "0" CACHE STRING "the package-specific version used for uploading the sources" )
-if(NOT HUNTER_ENABLED)
+if(NOT ASSIMP_HUNTER_ENABLED)
# Enable C++11 support globally
set_property( GLOBAL PROPERTY CXX_STANDARD 11 )
endif()
-IF(NOT IGNORE_GIT_HASH)
+IF(NOT ASSIMP_IGNORE_GIT_HASH)
# Get the current working branch
EXECUTE_PROCESS(
COMMAND git rev-parse --abbrev-ref HEAD
@@ -211,7 +211,7 @@ IF(NOT GIT_COMMIT_HASH)
ENDIF()
IF(ASSIMP_DOUBLE_PRECISION)
- ADD_DEFINITIONS(-DASSIMP_DOUBLE_PRECISION)
+ ADD_DEFINITIONS(-DASSIMP_DOUBLE_PRECISION)
ENDIF()
CONFIGURE_FILE(
@@ -243,30 +243,40 @@ IF( UNIX )
INCLUDE(GNUInstallDirs)
ENDIF()
-# Grouped compiler settings
+# Grouped compiler settings ########################################
IF ((CMAKE_C_COMPILER_ID MATCHES "GNU") AND NOT CMAKE_COMPILER_IS_MINGW)
- IF(NOT HUNTER_ENABLED)
- SET(CMAKE_CXX_FLAGS "-fPIC -std=c++0x ${CMAKE_CXX_FLAGS}")
- SET(CMAKE_C_FLAGS "-fPIC ${CMAKE_C_FLAGS}")
+ IF(NOT ASSIMP_HUNTER_ENABLED)
+ SET(CMAKE_CXX_STANDARD 11)
+ SET(CMAKE_POSITION_INDEPENDENT_CODE ON)
ENDIF()
# hide all not-exported symbols
- SET(CMAKE_CXX_FLAGS "-g -fvisibility=hidden -fno-strict-aliasing -Wall ${CMAKE_CXX_FLAGS}")
- SET(CMAKE_C_FLAGS "-fno-strict-aliasing ${CMAKE_C_FLAGS}")
- SET(LIBSTDC++_LIBRARIES -lstdc++)
+ IF(CMAKE_HOST_SYSTEM_PROCESSOR MATCHES "mips64" )
+ SET(CMAKE_CXX_FLAGS "-mxgot -fvisibility=hidden -fno-strict-aliasing -Wall ${CMAKE_CXX_FLAGS}")
+ SET(CMAKE_C_FLAGS "-fno-strict-aliasing ${CMAKE_C_FLAGS}")
+ SET(LIBSTDC++_LIBRARIES -lstdc++)
+ ELSE()
+ SET(CMAKE_CXX_FLAGS "-fvisibility=hidden -fno-strict-aliasing -Wall ${CMAKE_CXX_FLAGS}")
+ SET(CMAKE_C_FLAGS "-fno-strict-aliasing ${CMAKE_C_FLAGS}")
+ SET(LIBSTDC++_LIBRARIES -lstdc++)
+ ENDIF()
ELSEIF(MSVC)
# enable multi-core compilation with MSVC
- ADD_COMPILE_OPTIONS(/MP /bigobj /W4 /WX )
+ IF(CMAKE_CXX_COMPILER_ID MATCHES "Clang" ) # clang-cl
+ ADD_COMPILE_OPTIONS(/bigobj /W4 /WX )
+ ELSE() # msvc
+ ADD_COMPILE_OPTIONS(/MP /bigobj /W4 /WX)
+ ENDIF()
# disable "elements of array '' will be default initialized" warning on MSVC2013
IF(MSVC12)
ADD_COMPILE_OPTIONS(/wd4351)
ENDIF()
SET(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} /D_DEBUG /Zi /Od")
-ELSEIF ( "${CMAKE_CXX_COMPILER_ID}" MATCHES "Clang" )
- IF(NOT HUNTER_ENABLED)
- SET(CMAKE_CXX_FLAGS "-fPIC -std=c++11 ${CMAKE_CXX_FLAGS}")
- SET(CMAKE_C_FLAGS "-fPIC ${CMAKE_C_FLAGS}")
+ELSEIF (CMAKE_CXX_COMPILER_ID MATCHES "Clang" )
+ IF(NOT ASSIMP_HUNTER_ENABLED)
+ SET(CMAKE_CXX_STANDARD 11)
+ SET(CMAKE_POSITION_INDEPENDENT_CODE ON)
ENDIF()
- SET(CMAKE_CXX_FLAGS "-g -fvisibility=hidden -fno-strict-aliasing -Wall -Wno-long-long ${CMAKE_CXX_FLAGS}" )
+ SET(CMAKE_CXX_FLAGS "-fvisibility=hidden -fno-strict-aliasing -Wall -Wno-long-long ${CMAKE_CXX_FLAGS}" )
SET(CMAKE_C_FLAGS "-fno-strict-aliasing ${CMAKE_C_FLAGS}")
ELSEIF( CMAKE_COMPILER_IS_MINGW )
IF (CMAKE_CXX_COMPILER_VERSION VERSION_LESS 7.0)
@@ -274,7 +284,7 @@ ELSEIF( CMAKE_COMPILER_IS_MINGW )
ELSEIF(CMAKE_CXX_COMPILER_VERSION VERSION_LESS 7.3)
message(WARNING "MinGW is old, if you experience errors, update MinGW.")
ENDIF()
- IF(NOT HUNTER_ENABLED)
+ IF(NOT ASSIMP_HUNTER_ENABLED)
SET(CMAKE_CXX_FLAGS "-std=c++11 ${CMAKE_CXX_FLAGS}")
SET(CMAKE_C_FLAGS "-fPIC ${CMAKE_C_FLAGS}")
ENDIF()
@@ -283,7 +293,7 @@ ELSEIF( CMAKE_COMPILER_IS_MINGW )
ADD_DEFINITIONS( -U__STRICT_ANSI__ )
ENDIF()
-IF ( IOS AND NOT HUNTER_ENABLED)
+IF ( IOS AND NOT ASSIMP_HUNTER_ENABLED)
IF (CMAKE_BUILD_TYPE STREQUAL "Debug")
SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -fembed-bitcode -Og")
SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fembed-bitcode -Og")
@@ -311,16 +321,6 @@ IF (ASSIMP_ERROR_MAX)
ENDIF()
ENDIF()
-IF (ASSIMP_WERROR)
- MESSAGE(STATUS "Treating warnings as errors")
- IF (MSVC)
- ADD_COMPILE_OPTIONS(/WX)
- ELSE()
- SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Werror")
- SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Werror")
- ENDIF()
-ENDIF()
-
IF (ASSIMP_ASAN)
MESSAGE(STATUS "AddressSanitizer enabled")
SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fsanitize=address")
@@ -329,129 +329,124 @@ ENDIF()
IF (ASSIMP_UBSAN)
MESSAGE(STATUS "Undefined Behavior sanitizer enabled")
- SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fsanitize=undefined -fno-sanitize-recover=all")
- SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -fsanitize=undefined -fno-sanitize-recover=all")
+ SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fsanitize=undefined,shift,shift-exponent,integer-divide-by-zero,unreachable,vla-bound,null,return,signed-integer-overflow,bounds,float-divide-by-zero,float-cast-overflow,nonnull-attribute,returns-nonnull-attribute,bool,enum,vptr,pointer-overflow,builtin -fno-sanitize-recover=all")
+ SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -fsanitize=undefined,shift,shift-exponent,integer-divide-by-zero,unreachable,vla-bound,null,return,signed-integer-overflow,bounds,float-divide-by-zero,float-cast-overflow,nonnull-attribute,returns-nonnull-attribute,bool,enum,vptr,pointer-overflow,builtin -fno-sanitize-recover=all")
ENDIF()
INCLUDE (FindPkgMacros)
INCLUDE (PrecompiledHeader)
-# If this is an in-source build (CMAKE_SOURCE_DIR == CMAKE_BINARY_DIR),
-# write the library/executable files to the respective directories in the
-# source tree. During an out-of-source build, however, do not litter this
-# directory, since that is probably what the user wanted to avoid.
-IF ( CMAKE_SOURCE_DIR STREQUAL CMAKE_BINARY_DIR )
- SET( CMAKE_LIBRARY_OUTPUT_DIRECTORY "${CMAKE_HOME_DIRECTORY}/bin" )
- SET( CMAKE_ARCHIVE_OUTPUT_DIRECTORY "${CMAKE_HOME_DIRECTORY}/lib" )
- SET( CMAKE_RUNTIME_OUTPUT_DIRECTORY "${CMAKE_HOME_DIRECTORY}/bin" )
-ELSE()
- SET(CMAKE_ARCHIVE_OUTPUT_DIRECTORY "${CMAKE_CURRENT_BINARY_DIR}/lib")
- SET(CMAKE_LIBRARY_OUTPUT_DIRECTORY "${CMAKE_CURRENT_BINARY_DIR}/bin")
- SET(CMAKE_RUNTIME_OUTPUT_DIRECTORY "${CMAKE_CURRENT_BINARY_DIR}/bin")
-ENDIF ()
+# Set Assimp project output directory variables.
+SET(ASSIMP_RUNTIME_OUTPUT_DIRECTORY "${CMAKE_CURRENT_BINARY_DIR}/bin")
+SET(ASSIMP_LIBRARY_OUTPUT_DIRECTORY "${CMAKE_CURRENT_BINARY_DIR}/bin")
+SET(ASSIMP_ARCHIVE_OUTPUT_DIRECTORY "${CMAKE_CURRENT_BINARY_DIR}/lib")
-# Cache these to allow the user to override them manually.
-SET( ASSIMP_LIB_INSTALL_DIR "lib" CACHE STRING
- "Path the built library files are installed to." )
-SET( ASSIMP_INCLUDE_INSTALL_DIR "include" CACHE STRING
- "Path the header files are installed to." )
-SET( ASSIMP_BIN_INSTALL_DIR "bin" CACHE STRING
- "Path the tool executables are installed to." )
+# Macro used to set the output directories of a target to the
+# respective Assimp output directories.
+MACRO(TARGET_USE_COMMON_OUTPUT_DIRECTORY target)
+ set_target_properties(${target} PROPERTIES
+ RUNTIME_OUTPUT_DIRECTORY ${ASSIMP_RUNTIME_OUTPUT_DIRECTORY}
+ LIBRARY_OUTPUT_DIRECTORY ${ASSIMP_LIBRARY_OUTPUT_DIRECTORY}
+ ARCHIVE_OUTPUT_DIRECTORY ${ASSIMP_ARCHIVE_OUTPUT_DIRECTORY}
+ )
+ENDMACRO()
get_cmake_property(is_multi_config GENERATOR_IS_MULTI_CONFIG)
-IF (INJECT_DEBUG_POSTFIX AND (is_multi_config OR CMAKE_BUILD_TYPE STREQUAL "Debug"))
+IF (ASSIMP_INJECT_DEBUG_POSTFIX AND (is_multi_config OR CMAKE_BUILD_TYPE STREQUAL "Debug"))
SET(CMAKE_DEBUG_POSTFIX "d" CACHE STRING "Debug Postfix for lib, samples and tools")
ELSE()
SET(CMAKE_DEBUG_POSTFIX "" CACHE STRING "Debug Postfix for lib, samples and tools")
ENDIF()
# Only generate this target if no higher-level project already has
-IF (NOT TARGET uninstall)
+IF (NOT TARGET uninstall AND ASSIMP_INSTALL)
# add make uninstall capability
CONFIGURE_FILE("${CMAKE_CURRENT_SOURCE_DIR}/cmake-modules/cmake_uninstall.cmake.in" "${CMAKE_CURRENT_BINARY_DIR}/cmake_uninstall.cmake" IMMEDIATE @ONLY)
ADD_CUSTOM_TARGET(uninstall "${CMAKE_COMMAND}" -P "${CMAKE_CURRENT_BINARY_DIR}/cmake_uninstall.cmake")
ENDIF()
-IF(HUNTER_ENABLED)
+# cmake configuration files
+if(${BUILD_SHARED_LIBS})
+ set(BUILD_LIB_TYPE SHARED)
+else()
+ set(BUILD_LIB_TYPE STATIC)
+endif()
+
+IF( UNIX )
+ # Use GNUInstallDirs for Unix predefined directories
+ INCLUDE(GNUInstallDirs)
+
+ SET( ASSIMP_LIB_INSTALL_DIR ${CMAKE_INSTALL_LIBDIR})
+ SET( ASSIMP_INCLUDE_INSTALL_DIR ${CMAKE_INSTALL_INCLUDEDIR})
+ SET( ASSIMP_BIN_INSTALL_DIR ${CMAKE_INSTALL_BINDIR})
+ELSE()
+ # Cache these to allow the user to override them on non-Unix platforms
+ SET( ASSIMP_LIB_INSTALL_DIR "lib" CACHE STRING
+ "Path the built library files are installed to." )
+ SET( ASSIMP_INCLUDE_INSTALL_DIR "include" CACHE STRING
+ "Path the header files are installed to." )
+ SET( ASSIMP_BIN_INSTALL_DIR "bin" CACHE STRING
+ "Path the tool executables are installed to." )
+
+ SET(CMAKE_INSTALL_FULL_INCLUDEDIR ${CMAKE_INSTALL_PREFIX}/${ASSIMP_INCLUDE_INSTALL_DIR})
+ SET(CMAKE_INSTALL_FULL_LIBDIR ${CMAKE_INSTALL_PREFIX}/${ASSIMP_LIB_INSTALL_DIR})
+ SET(CMAKE_INSTALL_FULL_BINDIR ${CMAKE_INSTALL_PREFIX}/${ASSIMP_BIN_INSTALL_DIR})
+ENDIF()
+
+set(GENERATED_DIR "${CMAKE_CURRENT_BINARY_DIR}/generated")
+
+IF(ASSIMP_HUNTER_ENABLED)
set(CONFIG_INSTALL_DIR "lib/cmake/${PROJECT_NAME}")
- set(INCLUDE_INSTALL_DIR "include")
-
- set(GENERATED_DIR "${CMAKE_CURRENT_BINARY_DIR}/generated")
-
- # Configuration
+ set(CMAKE_CONFIG_TEMPLATE_FILE "cmake/assimp-hunter-config.cmake.in")
+ set(NAMESPACE "${PROJECT_NAME}::")
+ set(TARGETS_EXPORT_NAME "${PROJECT_NAME}Targets")
set(VERSION_CONFIG "${GENERATED_DIR}/${PROJECT_NAME}ConfigVersion.cmake")
set(PROJECT_CONFIG "${GENERATED_DIR}/${PROJECT_NAME}Config.cmake")
- set(TARGETS_EXPORT_NAME "${PROJECT_NAME}Targets")
- set(NAMESPACE "${PROJECT_NAME}::")
-
- # Include module with fuction 'write_basic_package_version_file'
- include(CMakePackageConfigHelpers)
-
- # Note: PROJECT_VERSION is used as a VERSION
- write_basic_package_version_file("${VERSION_CONFIG}" COMPATIBILITY SameMajorVersion)
-
- # Use variables:
- # * TARGETS_EXPORT_NAME
- # * PROJECT_NAME
- configure_package_config_file(
- "cmake/assimp-hunter-config.cmake.in"
- "${PROJECT_CONFIG}"
- INSTALL_DESTINATION "${CONFIG_INSTALL_DIR}"
- )
-
- install(
- FILES "${PROJECT_CONFIG}" "${VERSION_CONFIG}"
- DESTINATION "${CONFIG_INSTALL_DIR}"
- )
-
- install(
- EXPORT "${TARGETS_EXPORT_NAME}"
- NAMESPACE "${NAMESPACE}"
- DESTINATION "${CONFIG_INSTALL_DIR}"
- )
ELSE()
- # cmake configuration files
- if(${BUILD_SHARED_LIBS})
- set(BUILD_LIB_TYPE SHARED)
- else()
- set(BUILD_LIB_TYPE STATIC)
- endif()
- CONFIGURE_FILE("${CMAKE_CURRENT_SOURCE_DIR}/assimp-config.cmake.in" "${CMAKE_CURRENT_BINARY_DIR}/assimp-config.cmake" @ONLY IMMEDIATE)
- CONFIGURE_FILE("${CMAKE_CURRENT_SOURCE_DIR}/assimpTargets.cmake.in" "${CMAKE_CURRENT_BINARY_DIR}/assimpTargets.cmake" @ONLY IMMEDIATE)
- IF (is_multi_config)
- CONFIGURE_FILE("${CMAKE_CURRENT_SOURCE_DIR}/assimpTargets-debug.cmake.in" "${CMAKE_CURRENT_BINARY_DIR}/assimpTargets-debug.cmake" @ONLY IMMEDIATE)
- CONFIGURE_FILE("${CMAKE_CURRENT_SOURCE_DIR}/assimpTargets-release.cmake.in" "${CMAKE_CURRENT_BINARY_DIR}/assimpTargets-release.cmake" @ONLY IMMEDIATE)
- SET(PACKAGE_TARGETS_FILE "${CMAKE_CURRENT_BINARY_DIR}/assimpTargets-debug.cmake" "${CMAKE_CURRENT_BINARY_DIR}/assimpTargets-release.cmake")
- ELSEIF (CMAKE_BUILD_TYPE STREQUAL Debug)
- CONFIGURE_FILE("${CMAKE_CURRENT_SOURCE_DIR}/assimpTargets-debug.cmake.in" "${CMAKE_CURRENT_BINARY_DIR}/assimpTargets-debug.cmake" @ONLY IMMEDIATE)
- SET(PACKAGE_TARGETS_FILE "${CMAKE_CURRENT_BINARY_DIR}/assimpTargets-debug.cmake")
- ELSE()
- CONFIGURE_FILE("${CMAKE_CURRENT_SOURCE_DIR}/assimpTargets-release.cmake.in" "${CMAKE_CURRENT_BINARY_DIR}/assimpTargets-release.cmake" @ONLY IMMEDIATE)
- SET(PACKAGE_TARGETS_FILE "${CMAKE_CURRENT_BINARY_DIR}/assimpTargets-release.cmake")
- ENDIF()
- CONFIGURE_FILE("${CMAKE_CURRENT_SOURCE_DIR}/assimp-config-version.cmake.in" "${CMAKE_CURRENT_BINARY_DIR}/assimp-config-version.cmake" @ONLY IMMEDIATE)
- #we should generated these scripts after CMake VERSION 3.0.2 using export(EXPORT ...) and write_basic_package_version_file(...)
- INSTALL(FILES
- "${CMAKE_CURRENT_BINARY_DIR}/assimp-config.cmake"
- "${CMAKE_CURRENT_BINARY_DIR}/assimp-config-version.cmake"
- "${CMAKE_CURRENT_BINARY_DIR}/assimpTargets.cmake"
- ${PACKAGE_TARGETS_FILE}
- DESTINATION "${ASSIMP_LIB_INSTALL_DIR}/cmake/assimp-${ASSIMP_VERSION_MAJOR}.${ASSIMP_VERSION_MINOR}" COMPONENT ${LIBASSIMP-DEV_COMPONENT})
+ set(CONFIG_INSTALL_DIR "${ASSIMP_LIB_INSTALL_DIR}/cmake/assimp-${ASSIMP_VERSION_MAJOR}.${ASSIMP_VERSION_MINOR}")
+ set(CMAKE_CONFIG_TEMPLATE_FILE "cmake/assimp-plain-config.cmake.in")
+ string(TOLOWER ${PROJECT_NAME} PROJECT_NAME_LOWERCASE)
+ set(NAMESPACE "${PROJECT_NAME_LOWERCASE}::")
+ set(TARGETS_EXPORT_NAME "${PROJECT_NAME_LOWERCASE}Targets")
+ set(VERSION_CONFIG "${GENERATED_DIR}/${PROJECT_NAME_LOWERCASE}ConfigVersion.cmake")
+ set(PROJECT_CONFIG "${GENERATED_DIR}/${PROJECT_NAME_LOWERCASE}Config.cmake")
ENDIF()
-IF( BUILD_DOCS )
+set(INCLUDE_INSTALL_DIR "include")
+
+# Include module with fuction 'write_basic_package_version_file'
+include(CMakePackageConfigHelpers)
+
+# Note: PROJECT_VERSION is used as a VERSION
+write_basic_package_version_file("${VERSION_CONFIG}" COMPATIBILITY SameMajorVersion)
+
+configure_package_config_file(
+ ${CMAKE_CONFIG_TEMPLATE_FILE}
+ "${PROJECT_CONFIG}"
+ INSTALL_DESTINATION "${CONFIG_INSTALL_DIR}"
+)
+
+install(
+ FILES "${PROJECT_CONFIG}" "${VERSION_CONFIG}"
+ DESTINATION "${CONFIG_INSTALL_DIR}"
+ COMPONENT ${LIBASSIMP-DEV_COMPONENT}
+)
+
+install(
+ EXPORT "${TARGETS_EXPORT_NAME}"
+ NAMESPACE "${NAMESPACE}"
+ DESTINATION "${CONFIG_INSTALL_DIR}"
+ COMPONENT ${LIBASSIMP-DEV_COMPONENT}
+)
+
+IF( ASSIMP_BUILD_DOCS )
ADD_SUBDIRECTORY(doc)
ENDIF()
-# Look for system installed irrXML
-IF ( SYSTEM_IRRXML )
- FIND_PACKAGE( IrrXML REQUIRED )
-ENDIF()
-
# Search for external dependencies, and build them from source if not found
# Search for zlib
-IF(HUNTER_ENABLED)
+IF(ASSIMP_HUNTER_ENABLED)
hunter_add_package(ZLIB)
find_package(ZLIB CONFIG REQUIRED)
@@ -512,19 +507,19 @@ ENDIF()
SET ( ASSIMP_BUILD_ARCHITECTURE "" CACHE STRING
"describe the current architecture."
)
-IF ( ASSIMP_BUILD_ARCHITECTURE STREQUAL "")
-ELSE ()
+IF( ASSIMP_BUILD_ARCHITECTURE STREQUAL "")
+ELSE()
ADD_DEFINITIONS ( -D'ASSIMP_BUILD_ARCHITECTURE="${ASSIMP_BUILD_ARCHITECTURE}"' )
-ENDIF ()
+ENDIF()
# ${CMAKE_GENERATOR}
SET ( ASSIMP_BUILD_COMPILER "" CACHE STRING
"describe the current compiler."
)
-IF ( ASSIMP_BUILD_COMPILER STREQUAL "")
-ELSE ()
+IF( ASSIMP_BUILD_COMPILER STREQUAL "")
+ELSE()
ADD_DEFINITIONS ( -D'ASSIMP_BUILD_COMPILER="${ASSIMP_BUILD_COMPILER}"' )
-ENDIF ()
+ENDIF()
MARK_AS_ADVANCED ( ASSIMP_BUILD_ARCHITECTURE ASSIMP_BUILD_COMPILER )
@@ -575,10 +570,6 @@ ELSE ()
ADD_DEFINITIONS( -DASSIMP_BUILD_NO_C4D_IMPORTER )
ENDIF ()
-IF(NOT HUNTER_ENABLED)
- ADD_SUBDIRECTORY(contrib)
-ENDIF()
-
ADD_SUBDIRECTORY( code/ )
IF ( ASSIMP_BUILD_ASSIMP_TOOLS )
# The viewer for windows only
@@ -673,7 +664,8 @@ if(WIN32)
ENDIF()
IF(MSVC_TOOLSET_VERSION)
- set(MSVC_PREFIX "vc${MSVC_TOOLSET_VERSION}")
+ SET(MSVC_PREFIX "vc${MSVC_TOOLSET_VERSION}")
+ SET(ASSIMP_MSVC_VERSION ${MCVS_PREFIX})
ELSE()
IF(MSVC12)
SET(ASSIMP_MSVC_VERSION "vc120")
diff --git a/INSTALL b/INSTALL
index 350a5f109..ecec2585b 100644
--- a/INSTALL
+++ b/INSTALL
@@ -1,50 +1,50 @@
-
-========================================================================
-Open Asset Import Library (assimp) INSTALL
-========================================================================
-
-------------------------------
-Getting the documentation
-------------------------------
-
-A regularly-updated copy is available at
-http://assimp.sourceforge.net/lib_html/index.html
-
-A CHM file is included in the SVN repos: ./doc/AssimpDoc_Html/AssimpDoc.chm.
-To build the doxygen documentation on your own, follow these steps:
-
-a) download & install latest doxygen
-b) make sure doxygen is in the executable search path
-c) navigate to ./doc
-d) and run 'doxygen'
-
-Open the generated HTML (AssimpDoc_Html/index.html) in the browser of your choice.
-Windows only: To generate the CHM doc, install 'Microsoft HTML Workshop'
-and configure the path to it in the DOXYFILE first.
-
-------------------------------
-Building Assimp
-------------------------------
-
-More detailed build instructions can be found in the documentation,
-this section is just for the inpatient among you.
-
-CMake is the preferred build system for Assimp. The minimum required version
-is 2.6. If you don't have it yet, downloads for CMake can be found on
-http://www.cmake.org/.
-
-For Unix:
-
-1. mkdir build && cd build
-2. cmake .. -G 'Unix Makefiles'
-3. make -j4
-
-For Windows:
-1. Open a command prompt
-2. mkdir build
-3. cd build
-4. cmake ..
-5. cmake --build .
-
-For iOS:
-Just check the following project, which deploys a compiler toolchain for different iOS-versions: https://github.com/assimp/assimp/tree/master/port/iOS
+
+========================================================================
+Open Asset Import Library (assimp) INSTALL
+========================================================================
+
+------------------------------
+Getting the documentation
+------------------------------
+
+A regularly-updated copy is available at
+http://assimp.sourceforge.net/lib_html/index.html
+
+A CHM file is included in the SVN repos: ./doc/AssimpDoc_Html/AssimpDoc.chm.
+To build the doxygen documentation on your own, follow these steps:
+
+a) download & install latest doxygen
+b) make sure doxygen is in the executable search path
+c) navigate to ./doc
+d) and run 'doxygen'
+
+Open the generated HTML (AssimpDoc_Html/index.html) in the browser of your choice.
+Windows only: To generate the CHM doc, install 'Microsoft HTML Workshop'
+and configure the path to it in the DOXYFILE first.
+
+------------------------------
+Building Assimp
+------------------------------
+
+More detailed build instructions can be found in the documentation,
+this section is just for the inpatient among you.
+
+CMake is the preferred build system for Assimp. The minimum required version
+is 2.6. If you don't have it yet, downloads for CMake can be found on
+http://www.cmake.org/.
+
+For Unix:
+
+1. mkdir build && cd build
+2. cmake .. -G 'Unix Makefiles'
+3. make -j4
+
+For Windows:
+1. Open a command prompt
+2. mkdir build
+3. cd build
+4. cmake ..
+5. cmake --build .
+
+For iOS:
+Just check the following project, which deploys a compiler toolchain for different iOS-versions: https://github.com/assimp/assimp/tree/master/port/iOS
diff --git a/Readme.md b/Readme.md
index 61fff538f..c6212bcc0 100644
--- a/Readme.md
+++ b/Readme.md
@@ -2,9 +2,8 @@ Open Asset Import Library (assimp)
==================================
A library to import and export various 3d-model-formats including scene-post-processing to generate missing render data.
### Current project status ###
+[![Financial Contributors on Open Collective](https://opencollective.com/assimp/all/badge.svg?label=financial+contributors)](https://opencollective.com/assimp)
![C/C++ CI](https://github.com/assimp/assimp/workflows/C/C++%20CI/badge.svg)
-[![Linux Build Status](https://travis-ci.org/assimp/assimp.svg)](https://travis-ci.org/assimp/assimp)
-[![Windows Build Status](https://ci.appveyor.com/api/projects/status/tmo433wax6u6cjp4?svg=true)](https://ci.appveyor.com/project/kimkulling/assimp)
@@ -17,114 +16,22 @@ A library to import and export various 3d-model-formats including scene-post-pro
APIs are provided for C and C++. There are various bindings to other languages (C#, Java, Python, Delphi, D). Assimp also runs on Android and iOS.
-
-[Check the latest doc](https://assimp-docs.readthedocs.io/en/latest/).
-
Additionally, assimp features various __mesh post processing tools__: normals and tangent space generation, triangulation, vertex cache locality optimization, removal of degenerate primitives and duplicate vertices, sorting by primitive type, merging of redundant materials and many more.
+### Latest Doc's ###
+Please check the latest documents at [Asset-Importer-Lib-Doc](https://assimp-docs.readthedocs.io/en/latest/).
+
+### Get involved ###
This is the development repo containing the latest features and bugfixes. For productive use though, we recommend one of the stable releases available from [Github Assimp Releases](https://github.com/assimp/assimp/releases).
-
-Monthly donations via Patreon:
-
[![Patreon](https://cloud.githubusercontent.com/assets/8225057/5990484/70413560-a9ab-11e4-8942-1a63607c0b00.png)](http://www.patreon.com/assimp)
-
-
-One-off donations via PayPal:
-
[![PayPal](https://www.paypalobjects.com/en_US/i/btn/btn_donate_LG.gif)](https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=4JRJVPXC4QJM4)
-
+You find a bug in the docs? Use [Doc-Repo](https://github.com/assimp/assimp-docs).
-
Please check our Wiki as well: https://github.com/assimp/assimp/wiki
If you want to check our Model-Database, use the following repo: https://github.com/assimp/assimp-mdb
#### Supported file formats ####
-
-__Importers__:
-
-- 3D
-- [3DS](https://en.wikipedia.org/wiki/.3ds)
-- [3MF](https://en.wikipedia.org/wiki/3D_Manufacturing_Format)
-- AC
-- [AC3D](https://en.wikipedia.org/wiki/AC3D)
-- ACC
-- AMJ
-- ASE
-- ASK
-- B3D
-- [BLEND](https://en.wikipedia.org/wiki/.blend_(file_format))
-- [BVH](https://en.wikipedia.org/wiki/Biovision_Hierarchy)
-- CMS
-- COB
-- [DAE/Collada](https://en.wikipedia.org/wiki/COLLADA)
-- [DXF](https://en.wikipedia.org/wiki/AutoCAD_DXF)
-- ENFF
-- [FBX](https://en.wikipedia.org/wiki/FBX)
-- [glTF 1.0](https://en.wikipedia.org/wiki/GlTF#glTF_1.0) + GLB
-- [glTF 2.0](https://en.wikipedia.org/wiki/GlTF#glTF_2.0):
- At the moment for glTF2.0 the following extensions are supported:
- + KHR_lights_punctual ( 5.0 )
- + KHR_materials_pbrSpecularGlossiness ( 5.0 )
- + KHR_materials_unlit ( 5.0 )
- + KHR_texture_transform ( 5.1 under test )
-- HMB
-- IFC-STEP
-- IRR / IRRMESH
-- [LWO](https://en.wikipedia.org/wiki/LightWave_3D)
-- LWS
-- LXO
-- [M3D](https://bztsrc.gitlab.io/model3d)
-- MD2
-- MD3
-- MD5
-- MDC
-- MDL
-- MESH / MESH.XML
-- MOT
-- MS3D
-- NDO
-- NFF
-- [OBJ](https://en.wikipedia.org/wiki/Wavefront_.obj_file)
-- [OFF](https://en.wikipedia.org/wiki/OFF_(file_format))
-- [OGEX](https://en.wikipedia.org/wiki/Open_Game_Engine_Exchange)
-- [PLY](https://en.wikipedia.org/wiki/PLY_(file_format))
-- PMX
-- PRJ
-- Q3O
-- Q3S
-- RAW
-- SCN
-- SIB
-- SMD
-- [STP](https://en.wikipedia.org/wiki/ISO_10303-21)
-- [STL](https://en.wikipedia.org/wiki/STL_(file_format))
-- TER
-- UC
-- VTA
-- X
-- [X3D](https://en.wikipedia.org/wiki/X3D)
-- XGL
-- ZGL
-
-Additionally, some formats are supported by dependency on non-free code or external SDKs (not built by default):
-
-- [C4D](https://en.wikipedia.org/wiki/Cinema_4D) (https://github.com/assimp/assimp/wiki/Cinema4D-&-Melange) IMporting geometry + node hierarchy are currently supported
-
-__Exporters__:
-
-- DAE (Collada)
-- STL
-- OBJ
-- PLY
-- X
-- 3DS
-- JSON (for WebGl, via https://github.com/acgessler/assimp2json)
-- ASSBIN
-- STEP
-- glTF 1.0 (partial)
-- glTF 2.0 (partial)
-- 3MF ( experimental )
-- FBX ( experimental )
+You can find the complete list of supported file-formats [here](https://github.com/assimp/assimp/blob/master/doc/Fileformats.md)
### Building ###
Take a look into the https://github.com/assimp/assimp/blob/master/Build.md file. We are available in vcpkg, and our build system is CMake; if you used CMake before there is a good chance you know what to do.
@@ -166,7 +73,7 @@ The source code is organized in the following way:
For more information, visit [our website](http://assimp.org/). Or check out the `./doc`- folder, which contains the official documentation in HTML format.
(CHMs for Windows are included in some release packages and should be located right here in the root folder).
-If the docs don't solve your problem, ask on [StackOverflow](http://stackoverflow.com/questions/tagged/assimp?sort=newest). If you think you found a bug, please open an issue on Github.
+If the docs don't solve your problem, ask on [StackOverflow with the assimp-tag](http://stackoverflow.com/questions/tagged/assimp?sort=newest). If you think you found a bug, please open an issue on Github.
For development discussions, there is also a (very low-volume) mailing list, _assimp-discussions_
[(subscribe here)]( https://lists.sourceforge.net/lists/listinfo/assimp-discussions)
@@ -179,6 +86,38 @@ And we also have a Gitter-channel:Gitter [![Join the chat at https://gitter.im/a
Contributions to assimp are highly appreciated. The easiest way to get involved is to submit
a pull request with your changes against the main repository's `master` branch.
+## Contributors
+
+### Code Contributors
+
+This project exists thanks to all the people who contribute. [[Contribute](CONTRIBUTING.md)].
+
+
+
+### Financial Contributors
+
+Become a financial contributor and help us sustain our community. [[Contribute](https://opencollective.com/assimp/contribute)]
+
+#### Individuals
+
+
+
+Monthly donations via Patreon:
+
[![Patreon](https://cloud.githubusercontent.com/assets/8225057/5990484/70413560-a9ab-11e4-8942-1a63607c0b00.png)](http://www.patreon.com/assimp)
+
+
+
+One-off donations via PayPal:
+
[![PayPal](https://www.paypalobjects.com/en_US/i/btn/btn_donate_LG.gif)](https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=4JRJVPXC4QJM4)
+
+
+
+#### Organizations
+
+Support this project with your organization. Your logo will show up here with a link to your website. [[Contribute](https://opencollective.com/assimp/contribute)]
+
+
+
### License ###
Our license is based on the modified, __3-clause BSD__-License.
diff --git a/assimp-config-version.cmake.in b/assimp-config-version.cmake.in
deleted file mode 100644
index 68366820a..000000000
--- a/assimp-config-version.cmake.in
+++ /dev/null
@@ -1,48 +0,0 @@
-# Open Asset Import Library (assimp)
-# ----------------------------------------------------------------------
-# Copyright (c) 2006-2020, assimp team
-# All rights reserved.
-#
-# Redistribution and use of this software in source and binary forms,
-# with or without modification, are permitted provided that the
-# following conditions are met:
-#
-# * Redistributions of source code must retain the above
-# copyright notice, this list of conditions and the
-# following disclaimer.
-#
-# * Redistributions in binary form must reproduce the above
-# copyright notice, this list of conditions and the
-# following disclaimer in the documentation and/or other
-# materials provided with the distribution.
-#
-# * Neither the name of the assimp team, nor the names of its
-# contributors may be used to endorse or promote products
-# derived from this software without specific prior
-# written permission of the assimp team.
-#
-# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
-# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
-# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
-# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
-# OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
-# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
-# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
-# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
-# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
-# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-#----------------------------------------------------------------------
-set( PACKAGE_VERSION "@ASSIMP_VERSION@" )
-if( "${PACKAGE_FIND_VERSION}" VERSION_EQUAL "@ASSIMP_VERSION@")
- set(PACKAGE_VERSION_EXACT 1)
-endif()
-if( "${PACKAGE_FIND_VERSION_MAJOR}.${PACKAGE_FIND_VERSION_MINOR}" EQUAL "@ASSIMP_VERSION@" )
- set(PACKAGE_VERSION_COMPATIBLE 1)
-elseif( "${PACKAGE_FIND_VERSION_MAJOR}" EQUAL "@ASSIMP_VERSION_MAJOR@" )
- # for now backward compatible if minor version is less
- if( ${PACKAGE_FIND_VERSION_MINOR} LESS @ASSIMP_VERSION_MINOR@ )
- set(PACKAGE_VERSION_COMPATIBLE 1)
- endif()
-endif()
-set( ASSIMP_STATIC_LIB "@ASSIMP_BUILD_STATIC_LIB@")
diff --git a/assimp-config.cmake.in b/assimp-config.cmake.in
deleted file mode 100644
index 0ab9fd071..000000000
--- a/assimp-config.cmake.in
+++ /dev/null
@@ -1 +0,0 @@
-include(${CMAKE_CURRENT_LIST_DIR}/assimpTargets.cmake)
diff --git a/assimp.pc.in b/assimp.pc.in
index 02cf59dc4..555a3a1d3 100644
--- a/assimp.pc.in
+++ b/assimp.pc.in
@@ -1,7 +1,5 @@
-prefix=@CMAKE_INSTALL_PREFIX@
-exec_prefix=@CMAKE_INSTALL_PREFIX@/
-libdir=@CMAKE_INSTALL_PREFIX@/@ASSIMP_LIB_INSTALL_DIR@
-includedir=@CMAKE_INSTALL_PREFIX@/@ASSIMP_INCLUDE_INSTALL_DIR@
+libdir=@CMAKE_INSTALL_FULL_LIBDIR@
+includedir=@CMAKE_INSTALL_FULL_INCLUDEDIR@
Name: @CMAKE_PROJECT_NAME@
Description: Import various well-known 3D model formats in an uniform manner.
diff --git a/assimpTargets-debug.cmake.in b/assimpTargets-debug.cmake.in
deleted file mode 100644
index 4cb917fd8..000000000
--- a/assimpTargets-debug.cmake.in
+++ /dev/null
@@ -1,123 +0,0 @@
-#----------------------------------------------------------------
-# Generated CMake target import file for configuration "Debug".
-#----------------------------------------------------------------
-
-# Commands may need to know the format version.
-set(CMAKE_IMPORT_FILE_VERSION 1)
-
-set(ASSIMP_BUILD_SHARED_LIBS @BUILD_SHARED_LIBS@)
-
-if(MSVC)
- if(MSVC_TOOLSET_VERSION)
- set(MSVC_PREFIX "vc${MSVC_TOOLSET_VERSION}")
- else()
- if( MSVC70 OR MSVC71 )
- set(MSVC_PREFIX "vc70")
- elseif( MSVC80 )
- set(MSVC_PREFIX "vc80")
- elseif( MSVC90 )
- set(MSVC_PREFIX "vc90")
- elseif( MSVC10 )
- set(MSVC_PREFIX "vc100")
- elseif( MSVC11 )
- set(MSVC_PREFIX "vc110")
- elseif( MSVC12 )
- set(MSVC_PREFIX "vc120")
- elseif( MSVC_VERSION LESS 1910)
- set(MSVC_PREFIX "vc140")
- elseif( MSVC_VERSION LESS 1920)
- set(MSVC_PREFIX "vc141")
- elseif( MSVC_VERSION LESS 1930)
- set(MSVC_PREFIX "vc142")
- else()
- set(MSVC_PREFIX "vc150")
- endif()
- endif()
- set(ASSIMP_LIBRARY_SUFFIX "@ASSIMP_LIBRARY_SUFFIX@-${MSVC_PREFIX}-mt" CACHE STRING "the suffix for the assimp windows library" )
-
- file(TO_NATIVE_PATH "${_IMPORT_PREFIX}" _IMPORT_PREFIX)
-
- if(ASSIMP_BUILD_SHARED_LIBS)
- set(sharedLibraryName "assimp${ASSIMP_LIBRARY_SUFFIX}@CMAKE_DEBUG_POSTFIX@@CMAKE_SHARED_LIBRARY_SUFFIX@")
- set(importLibraryName "assimp${ASSIMP_LIBRARY_SUFFIX}@CMAKE_DEBUG_POSTFIX@@CMAKE_IMPORT_LIBRARY_SUFFIX@")
-
- # Import target "assimp::assimp" for configuration "Debug"
- set_property(TARGET assimp::assimp APPEND PROPERTY IMPORTED_CONFIGURATIONS DEBUG)
- set_target_properties(assimp::assimp PROPERTIES
- IMPORTED_IMPLIB_DEBUG "${_IMPORT_PREFIX}/lib/${importLibraryName}"
- IMPORTED_LOCATION_DEBUG "${_IMPORT_PREFIX}/bin/${sharedLibraryName}"
- )
- list(APPEND _IMPORT_CHECK_TARGETS assimp::assimp )
- list(APPEND _IMPORT_CHECK_FILES_FOR_assimp::assimp "${_IMPORT_PREFIX}/lib/${importLibraryName}")
- list(APPEND _IMPORT_CHECK_FILES_FOR_assimp::assimp "${_IMPORT_PREFIX}/bin/${sharedLibraryName}" )
- else()
- set(staticLibraryName "assimp${ASSIMP_LIBRARY_SUFFIX}@CMAKE_DEBUG_POSTFIX@@CMAKE_STATIC_LIBRARY_SUFFIX@")
-
- # Import target "assimp::assimp" for configuration "Debug"
- set_property(TARGET assimp::assimp APPEND PROPERTY IMPORTED_CONFIGURATIONS DEBUG)
- set_target_properties(assimp::assimp PROPERTIES
- IMPORTED_LOCATION_DEBUG "${_IMPORT_PREFIX}/lib/${staticLibraryName}"
- )
- list(APPEND _IMPORT_CHECK_TARGETS assimp::assimp )
- list(APPEND _IMPORT_CHECK_FILES_FOR_assimp::assimp "${_IMPORT_PREFIX}/lib/${staticLibraryName}")
- endif()
-
-else()
- set(ASSIMP_LIBRARY_SUFFIX "@ASSIMP_LIBRARY_SUFFIX@" CACHE STRING "the suffix for the assimp libraries" )
- if(ASSIMP_BUILD_SHARED_LIBS)
- if(WIN32)
- # Handle MinGW compiler.
- set(sharedLibraryName "libassimp${ASSIMP_LIBRARY_SUFFIX}@CMAKE_DEBUG_POSTFIX@@CMAKE_SHARED_LIBRARY_SUFFIX@@CMAKE_STATIC_LIBRARY_SUFFIX@")
- elseif(APPLE)
- set(sharedLibraryName "libassimp${ASSIMP_LIBRARY_SUFFIX}@CMAKE_DEBUG_POSTFIX@.@ASSIMP_VERSION_MAJOR@@CMAKE_SHARED_LIBRARY_SUFFIX@")
- else()
- set(sharedLibraryName "libassimp${ASSIMP_LIBRARY_SUFFIX}@CMAKE_DEBUG_POSTFIX@@CMAKE_SHARED_LIBRARY_SUFFIX@.@ASSIMP_VERSION_MAJOR@")
- endif()
- set_target_properties(assimp::assimp PROPERTIES
- IMPORTED_SONAME_DEBUG "${sharedLibraryName}"
- IMPORTED_LOCATION_DEBUG "${_IMPORT_PREFIX}/lib/${sharedLibraryName}"
- )
- list(APPEND _IMPORT_CHECK_TARGETS assimp::assimp )
- list(APPEND _IMPORT_CHECK_FILES_FOR_assimp::assimp "${_IMPORT_PREFIX}/lib/${sharedLibraryName}" )
- else()
- set(staticLibraryName "libassimp${ASSIMP_LIBRARY_SUFFIX}@CMAKE_DEBUG_POSTFIX@@CMAKE_STATIC_LIBRARY_SUFFIX@")
- set_target_properties(assimp::assimp PROPERTIES
- IMPORTED_LOCATION_DEBUG "${_IMPORT_PREFIX}/lib/${staticLibraryName}"
- )
- list(APPEND _IMPORT_CHECK_TARGETS assimp::assimp )
- list(APPEND _IMPORT_CHECK_FILES_FOR_assimp::assimp "${_IMPORT_PREFIX}/lib/${staticLibraryName}" )
- endif()
-endif()
-
-
-
-
-# Commands beyond this point should not need to know the version.
-set(CMAKE_IMPORT_FILE_VERSION)
-
-get_filename_component(ASSIMP_ROOT_DIR "@CMAKE_INSTALL_PREFIX@" REALPATH)
-set( ASSIMP_CXX_FLAGS ) # dynamically linked library
-set( ASSIMP_LINK_FLAGS "" )
-set( ASSIMP_LIBRARY_DIRS "${ASSIMP_ROOT_DIR}/@ASSIMP_LIB_INSTALL_DIR@")
-set( ASSIMP_INCLUDE_DIRS "${ASSIMP_ROOT_DIR}/@ASSIMP_INCLUDE_INSTALL_DIR@")
-if(ASSIMP_BUILD_SHARED_LIBS)
- set( ASSIMP_LIBRARIES ${sharedLibraryName})
-else()
- set( ASSIMP_LIBRARIES ${staticLibraryName})
-endif()
-
-# for compatibility with pkg-config
-set(ASSIMP_CFLAGS_OTHER "${ASSIMP_CXX_FLAGS}")
-set(ASSIMP_LDFLAGS_OTHER "${ASSIMP_LINK_FLAGS}")
-
-MARK_AS_ADVANCED(
- ASSIMP_ROOT_DIR
- ASSIMP_CXX_FLAGS
- ASSIMP_LINK_FLAGS
- ASSIMP_INCLUDE_DIRS
- ASSIMP_LIBRARIES
- ASSIMP_CFLAGS_OTHER
- ASSIMP_LDFLAGS_OTHER
- ASSIMP_LIBRARY_SUFFIX
- ASSIMP_BUILD_SHARED_LIBS
-)
diff --git a/assimpTargets-release.cmake.in b/assimpTargets-release.cmake.in
deleted file mode 100644
index 702109305..000000000
--- a/assimpTargets-release.cmake.in
+++ /dev/null
@@ -1,122 +0,0 @@
-#----------------------------------------------------------------
-# Generated CMake target import file for configuration "Release".
-#----------------------------------------------------------------
-
-# Commands may need to know the format version.
-set(CMAKE_IMPORT_FILE_VERSION 1)
-
-set(ASSIMP_BUILD_SHARED_LIBS @BUILD_SHARED_LIBS@)
-
-if(MSVC)
- if(MSVC_TOOLSET_VERSION)
- set(MSVC_PREFIX "vc${MSVC_TOOLSET_VERSION}")
- else()
- if( MSVC70 OR MSVC71 )
- set(MSVC_PREFIX "vc70")
- elseif( MSVC80 )
- set(MSVC_PREFIX "vc80")
- elseif( MSVC90 )
- set(MSVC_PREFIX "vc90")
- elseif( MSVC10 )
- set(MSVC_PREFIX "vc100")
- elseif( MSVC11 )
- set(MSVC_PREFIX "vc110")
- elseif( MSVC12 )
- set(MSVC_PREFIX "vc120")
- elseif( MSVC_VERSION LESS 1910)
- set(MSVC_PREFIX "vc140")
- elseif( MSVC_VERSION LESS 1920)
- set(MSVC_PREFIX "vc141")
- elseif( MSVC_VERSION LESS 1930)
- set(MSVC_PREFIX "vc142")
- else()
- set(MSVC_PREFIX "vc150")
- endif()
- endif()
- set(ASSIMP_LIBRARY_SUFFIX "@ASSIMP_LIBRARY_SUFFIX@-${MSVC_PREFIX}-mt" CACHE STRING "the suffix for the assimp windows library" )
-
- file(TO_NATIVE_PATH "${_IMPORT_PREFIX}" _IMPORT_PREFIX)
-
- if(ASSIMP_BUILD_SHARED_LIBS)
- set(sharedLibraryName "assimp${ASSIMP_LIBRARY_SUFFIX}@CMAKE_SHARED_LIBRARY_SUFFIX@")
- set(importLibraryName "assimp${ASSIMP_LIBRARY_SUFFIX}@CMAKE_IMPORT_LIBRARY_SUFFIX@")
-
- # Import target "assimp::assimp" for configuration "Release"
- set_property(TARGET assimp::assimp APPEND PROPERTY IMPORTED_CONFIGURATIONS RELEASE)
- set_target_properties(assimp::assimp PROPERTIES
- IMPORTED_IMPLIB_RELEASE "${_IMPORT_PREFIX}/lib/${importLibraryName}"
- IMPORTED_LOCATION_RELEASE "${_IMPORT_PREFIX}/bin/${sharedLibraryName}"
- )
- list(APPEND _IMPORT_CHECK_TARGETS assimp::assimp )
- list(APPEND _IMPORT_CHECK_FILES_FOR_assimp::assimp "${_IMPORT_PREFIX}/lib/${importLibraryName}")
- list(APPEND _IMPORT_CHECK_FILES_FOR_assimp::assimp "${_IMPORT_PREFIX}/bin/${sharedLibraryName}" )
- else()
- set(staticLibraryName "assimp${ASSIMP_LIBRARY_SUFFIX}@CMAKE_STATIC_LIBRARY_SUFFIX@")
-
- # Import target "assimp::assimp" for configuration "Release"
- set_property(TARGET assimp::assimp APPEND PROPERTY IMPORTED_CONFIGURATIONS RELEASE)
- set_target_properties(assimp::assimp PROPERTIES
- IMPORTED_LOCATION_RELEASE "${_IMPORT_PREFIX}/lib/${staticLibraryName}"
- )
- list(APPEND _IMPORT_CHECK_TARGETS assimp::assimp )
- list(APPEND _IMPORT_CHECK_FILES_FOR_assimp::assimp "${_IMPORT_PREFIX}/lib/${staticLibraryName}")
- endif()
-
-else()
- set(ASSIMP_LIBRARY_SUFFIX "@ASSIMP_LIBRARY_SUFFIX@" CACHE STRING "the suffix for the assimp libraries" )
- if(ASSIMP_BUILD_SHARED_LIBS)
- if(WIN32)
- # Handle MinGW compiler.
- set(sharedLibraryName "libassimp${ASSIMP_LIBRARY_SUFFIX}@CMAKE_DEBUG_POSTFIX@@CMAKE_SHARED_LIBRARY_SUFFIX@@CMAKE_STATIC_LIBRARY_SUFFIX@")
- elseif(APPLE)
- set(sharedLibraryName "libassimp${ASSIMP_LIBRARY_SUFFIX}.@ASSIMP_VERSION_MAJOR@@CMAKE_SHARED_LIBRARY_SUFFIX@")
- else()
- set(sharedLibraryName "libassimp${ASSIMP_LIBRARY_SUFFIX}@CMAKE_SHARED_LIBRARY_SUFFIX@.@ASSIMP_VERSION_MAJOR@")
- endif()
- set_target_properties(assimp::assimp PROPERTIES
- IMPORTED_SONAME_RELEASE "${sharedLibraryName}"
-
- IMPORTED_LOCATION_RELEASE "${_IMPORT_PREFIX}/lib/${sharedLibraryName}"
- )
- list(APPEND _IMPORT_CHECK_TARGETS assimp::assimp )
- list(APPEND _IMPORT_CHECK_FILES_FOR_assimp::assimp "${_IMPORT_PREFIX}/lib/${sharedLibraryName}" )
- else()
- set(staticLibraryName "libassimp${ASSIMP_LIBRARY_SUFFIX}@CMAKE_STATIC_LIBRARY_SUFFIX@")
- set_target_properties(assimp::assimp PROPERTIES
- IMPORTED_LOCATION_RELEASE "${_IMPORT_PREFIX}/lib/${staticLibraryName}"
- )
- list(APPEND _IMPORT_CHECK_TARGETS assimp::assimp )
- list(APPEND _IMPORT_CHECK_FILES_FOR_assimp::assimp "${_IMPORT_PREFIX}/lib/${staticLibraryName}" )
- endif()
-endif()
-
-# Commands beyond this point should not need to know the version.
-set(CMAKE_IMPORT_FILE_VERSION)
-
-get_filename_component(ASSIMP_ROOT_DIR "@CMAKE_INSTALL_PREFIX@" REALPATH)
-
-set( ASSIMP_CXX_FLAGS ) # dynamically linked library
-set( ASSIMP_LINK_FLAGS "" )
-set( ASSIMP_LIBRARY_DIRS "${ASSIMP_ROOT_DIR}/@ASSIMP_LIB_INSTALL_DIR@")
-set( ASSIMP_INCLUDE_DIRS "${ASSIMP_ROOT_DIR}/@ASSIMP_INCLUDE_INSTALL_DIR@")
-if(ASSIMP_BUILD_SHARED_LIBS)
- set( ASSIMP_LIBRARIES ${sharedLibraryName})
-else()
- set( ASSIMP_LIBRARIES ${staticLibraryName})
-endif()
-
-# for compatibility with pkg-config
-set(ASSIMP_CFLAGS_OTHER "${ASSIMP_CXX_FLAGS}")
-set(ASSIMP_LDFLAGS_OTHER "${ASSIMP_LINK_FLAGS}")
-
-MARK_AS_ADVANCED(
- ASSIMP_ROOT_DIR
- ASSIMP_CXX_FLAGS
- ASSIMP_LINK_FLAGS
- ASSIMP_INCLUDE_DIRS
- ASSIMP_LIBRARIES
- ASSIMP_CFLAGS_OTHER
- ASSIMP_LDFLAGS_OTHER
- ASSIMP_LIBRARY_SUFFIX
- ASSIMP_BUILD_SHARED_LIBS
-)
diff --git a/assimpTargets.cmake.in b/assimpTargets.cmake.in
deleted file mode 100644
index b1c618c3a..000000000
--- a/assimpTargets.cmake.in
+++ /dev/null
@@ -1,104 +0,0 @@
-# Generated by CMake
-
-if("${CMAKE_MAJOR_VERSION}.${CMAKE_MINOR_VERSION}" LESS 2.5)
- message(FATAL_ERROR "CMake >= 2.6.0 required")
-endif()
-cmake_policy(PUSH)
-cmake_policy(VERSION 2.6)
-# Required for the evaluation of "if(@BUILD_SHARED_LIBS@)" below to function
-cmake_policy(SET CMP0012 NEW)
-
-#----------------------------------------------------------------
-# Generated CMake target import file.
-#----------------------------------------------------------------
-
-# Commands may need to know the format version.
-set(CMAKE_IMPORT_FILE_VERSION 1)
-
-# Protect against multiple inclusion, which would fail when already imported targets are added once more.
-set(_targetsDefined)
-set(_targetsNotDefined)
-set(_expectedTargets)
-foreach(_expectedTarget assimp::assimp)
- list(APPEND _expectedTargets ${_expectedTarget})
- if(NOT TARGET ${_expectedTarget})
- list(APPEND _targetsNotDefined ${_expectedTarget})
- endif()
- if(TARGET ${_expectedTarget})
- list(APPEND _targetsDefined ${_expectedTarget})
- endif()
-endforeach()
-if("${_targetsDefined}" STREQUAL "${_expectedTargets}")
- unset(_targetsDefined)
- unset(_targetsNotDefined)
- unset(_expectedTargets)
- set(CMAKE_IMPORT_FILE_VERSION)
- cmake_policy(POP)
- return()
-endif()
-if(NOT "${_targetsDefined}" STREQUAL "")
- message(FATAL_ERROR "Some (but not all) targets in this export set were already defined.\nTargets Defined: ${_targetsDefined}\nTargets not yet defined: ${_targetsNotDefined}\n")
-endif()
-unset(_targetsDefined)
-unset(_targetsNotDefined)
-unset(_expectedTargets)
-
-
-# Compute the installation prefix relative to this file.
-get_filename_component(_IMPORT_PREFIX "${CMAKE_CURRENT_LIST_FILE}" PATH)
-get_filename_component(_IMPORT_PREFIX "${_IMPORT_PREFIX}" PATH)
-get_filename_component(_IMPORT_PREFIX "${_IMPORT_PREFIX}" PATH)
-get_filename_component(_IMPORT_PREFIX "${_IMPORT_PREFIX}" PATH)
-if(_IMPORT_PREFIX STREQUAL "/")
- set(_IMPORT_PREFIX "")
-endif()
-
-# Create imported target assimp::assimp
-add_library(assimp::assimp @BUILD_LIB_TYPE@ IMPORTED)
-
-set_target_properties(assimp::assimp PROPERTIES
- COMPATIBLE_INTERFACE_STRING "assimp_MAJOR_VERSION"
- INTERFACE_assimp_MAJOR_VERSION "1"
- INTERFACE_INCLUDE_DIRECTORIES "${_IMPORT_PREFIX}/include;${_IMPORT_PREFIX}/include"
- #INTERFACE_LINK_LIBRARIES "TxtUtils::TxtUtils;MealyMachine::MealyMachine"
-)
-
-if(CMAKE_VERSION VERSION_LESS 2.8.12)
- message(FATAL_ERROR "This file relies on consumers using CMake 2.8.12 or greater.")
-endif()
-
-# Load information for each installed configuration.
-get_filename_component(_DIR "${CMAKE_CURRENT_LIST_FILE}" PATH)
-file(GLOB CONFIG_FILES "${_DIR}/assimpTargets-*.cmake")
-foreach(f ${CONFIG_FILES})
- include(${f})
-endforeach()
-
-# Cleanup temporary variables.
-set(_IMPORT_PREFIX)
-
-# Loop over all imported files and verify that they actually exist
-foreach(target ${_IMPORT_CHECK_TARGETS} )
- foreach(file ${_IMPORT_CHECK_FILES_FOR_${target}} )
- if(NOT EXISTS "${file}" )
- message(FATAL_ERROR "The imported target \"${target}\" references the file
- \"${file}\"
-but this file does not exist. Possible reasons include:
-* The file was deleted, renamed, or moved to another location.
-* An install or uninstall procedure did not complete successfully.
-* The installation package was faulty and contained
- \"${CMAKE_CURRENT_LIST_FILE}\"
-but not all the files it references.
-")
- endif()
- endforeach()
- unset(_IMPORT_CHECK_FILES_FOR_${target})
-endforeach()
-unset(_IMPORT_CHECK_TARGETS)
-
-# This file does not depend on other imported targets which have
-# been exported from the same project but in a separate export set.
-
-# Commands beyond this point should not need to know the version.
-set(CMAKE_IMPORT_FILE_VERSION)
-cmake_policy(POP)
diff --git a/cmake-modules/FindRT.cmake b/cmake-modules/FindRT.cmake
index 17d5df81d..c397acabd 100644
--- a/cmake-modules/FindRT.cmake
+++ b/cmake-modules/FindRT.cmake
@@ -16,5 +16,5 @@ set(RT_LIBRARIES ${RT_LIBRARY})
# handle the QUIETLY and REQUIRED arguments and set
# RT_FOUND to TRUE if all listed variables are TRUE
include(FindPackageHandleStandardArgs)
-find_package_handle_standard_args(rt DEFAULT_MSG RT_LIBRARY)
+find_package_handle_standard_args(RT DEFAULT_MSG RT_LIBRARY)
mark_as_advanced(RT_LIBRARY)
diff --git a/cmake/HunterGate.cmake b/cmake/HunterGate.cmake
index 887557a58..6d9cc2401 100644
--- a/cmake/HunterGate.cmake
+++ b/cmake/HunterGate.cmake
@@ -1,4 +1,4 @@
-# Copyright (c) 2013-2018, Ruslan Baratov
+# Copyright (c) 2013-2019, Ruslan Baratov
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
@@ -60,7 +60,7 @@ option(HUNTER_STATUS_PRINT "Print working status" ON)
option(HUNTER_STATUS_DEBUG "Print a lot info" OFF)
option(HUNTER_TLS_VERIFY "Enable/disable TLS certificate checking on downloads" ON)
-set(HUNTER_WIKI "https://github.com/ruslo/hunter/wiki")
+set(HUNTER_ERROR_PAGE "https://docs.hunter.sh/en/latest/reference/errors")
function(hunter_gate_status_print)
if(HUNTER_STATUS_PRINT OR HUNTER_STATUS_DEBUG)
@@ -79,9 +79,9 @@ function(hunter_gate_status_debug)
endif()
endfunction()
-function(hunter_gate_wiki wiki_page)
- message("------------------------------ WIKI -------------------------------")
- message(" ${HUNTER_WIKI}/${wiki_page}")
+function(hunter_gate_error_page error_page)
+ message("------------------------------ ERROR ------------------------------")
+ message(" ${HUNTER_ERROR_PAGE}/${error_page}.html")
message("-------------------------------------------------------------------")
message("")
message(FATAL_ERROR "")
@@ -94,14 +94,13 @@ function(hunter_gate_internal_error)
endforeach()
message("[hunter ** INTERNAL **] [Directory:${CMAKE_CURRENT_LIST_DIR}]")
message("")
- hunter_gate_wiki("error.internal")
+ hunter_gate_error_page("error.internal")
endfunction()
function(hunter_gate_fatal_error)
- cmake_parse_arguments(hunter "" "WIKI" "" "${ARGV}")
- string(COMPARE EQUAL "${hunter_WIKI}" "" have_no_wiki)
- if(have_no_wiki)
- hunter_gate_internal_error("Expected wiki")
+ cmake_parse_arguments(hunter "" "ERROR_PAGE" "" "${ARGV}")
+ if("${hunter_ERROR_PAGE}" STREQUAL "")
+ hunter_gate_internal_error("Expected ERROR_PAGE")
endif()
message("")
foreach(x ${hunter_UNPARSED_ARGUMENTS})
@@ -109,11 +108,11 @@ function(hunter_gate_fatal_error)
endforeach()
message("[hunter ** FATAL ERROR **] [Directory:${CMAKE_CURRENT_LIST_DIR}]")
message("")
- hunter_gate_wiki("${hunter_WIKI}")
+ hunter_gate_error_page("${hunter_ERROR_PAGE}")
endfunction()
function(hunter_gate_user_error)
- hunter_gate_fatal_error(${ARGV} WIKI "error.incorrect.input.data")
+ hunter_gate_fatal_error(${ARGV} ERROR_PAGE "error.incorrect.input.data")
endfunction()
function(hunter_gate_self root version sha1 result)
@@ -195,7 +194,7 @@ function(hunter_gate_detect_root)
hunter_gate_fatal_error(
"Can't detect HUNTER_ROOT"
- WIKI "error.detect.hunter.root"
+ ERROR_PAGE "error.detect.hunter.root"
)
endfunction()
@@ -214,7 +213,7 @@ function(hunter_gate_download dir)
"Settings:"
" HUNTER_ROOT: ${HUNTER_GATE_ROOT}"
" HUNTER_SHA1: ${HUNTER_GATE_SHA1}"
- WIKI "error.run.install"
+ ERROR_PAGE "error.run.install"
)
endif()
string(COMPARE EQUAL "${dir}" "" is_bad)
@@ -400,7 +399,7 @@ macro(HunterGate)
hunter_gate_fatal_error(
"Please set HunterGate *before* 'project' command. "
"Detected project: ${PROJECT_NAME}"
- WIKI "error.huntergate.before.project"
+ ERROR_PAGE "error.huntergate.before.project"
)
endif()
@@ -470,7 +469,7 @@ macro(HunterGate)
"HUNTER_ROOT (${HUNTER_GATE_ROOT}) contains spaces."
"Set HUNTER_ALLOW_SPACES_IN_PATH=ON to skip this error"
"(Use at your own risk!)"
- WIKI "error.spaces.in.hunter.root"
+ ERROR_PAGE "error.spaces.in.hunter.root"
)
endif()
endif()
diff --git a/cmake/assimp-hunter-config.cmake.in b/cmake/assimp-hunter-config.cmake.in
index 34762ac54..b5283f4fb 100644
--- a/cmake/assimp-hunter-config.cmake.in
+++ b/cmake/assimp-hunter-config.cmake.in
@@ -2,13 +2,13 @@
find_package(RapidJSON CONFIG REQUIRED)
find_package(ZLIB CONFIG REQUIRED)
-find_package(utf8 CONFIG REQUIRED)
-find_package(irrXML CONFIG REQUIRED)
+find_package(utf8cpp CONFIG REQUIRED)
find_package(minizip CONFIG REQUIRED)
find_package(openddlparser CONFIG REQUIRED)
find_package(poly2tri CONFIG REQUIRED)
find_package(polyclipping CONFIG REQUIRED)
find_package(zip CONFIG REQUIRED)
+find_package(pugixml CONFIG REQUIRED)
include("${CMAKE_CURRENT_LIST_DIR}/@TARGETS_EXPORT_NAME@.cmake")
check_required_components("@PROJECT_NAME@")
diff --git a/cmake/assimp-plain-config.cmake.in b/cmake/assimp-plain-config.cmake.in
new file mode 100644
index 000000000..6551dcb68
--- /dev/null
+++ b/cmake/assimp-plain-config.cmake.in
@@ -0,0 +1,9 @@
+@PACKAGE_INIT@
+
+include("${CMAKE_CURRENT_LIST_DIR}/@TARGETS_EXPORT_NAME@.cmake")
+
+set(ASSIMP_ROOT_DIR ${PACKAGE_PREFIX_DIR})
+set(ASSIMP_LIBRARIES assimp::assimp)
+set(ASSIMP_BUILD_SHARED_LIBS @BUILD_SHARED_LIBS@)
+get_property(ASSIMP_INCLUDE_DIRS TARGET assimp::assimp PROPERTY INTERFACE_INCLUDE_DIRECTORIES)
+set(ASSIMP_LIBRARY_DIRS "")
diff --git a/code/3MF/D3MFImporter.cpp b/code/3MF/D3MFImporter.cpp
deleted file mode 100644
index 2f30c4fc0..000000000
--- a/code/3MF/D3MFImporter.cpp
+++ /dev/null
@@ -1,483 +0,0 @@
-/*
-Open Asset Import Library (assimp)
-----------------------------------------------------------------------
-
-Copyright (c) 2006-2020, assimp team
-
-
-All rights reserved.
-
-Redistribution and use of this software in source and binary forms,
-with or without modification, are permitted provided that the
-following conditions are met:
-
-* Redistributions of source code must retain the above
- copyright notice, this list of conditions and the
- following disclaimer.
-
-* Redistributions in binary form must reproduce the above
- copyright notice, this list of conditions and the
- following disclaimer in the documentation and/or other
- materials provided with the distribution.
-
-* Neither the name of the assimp team, nor the names of its
- contributors may be used to endorse or promote products
- derived from this software without specific prior
- written permission of the assimp team.
-
-THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
-"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
-LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
-A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
-OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
-SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
-LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
-DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
-THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
-OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-
-----------------------------------------------------------------------
-*/
-
-#ifndef ASSIMP_BUILD_NO_3MF_IMPORTER
-
-#include "D3MFImporter.h"
-
-#include
-#include
-#include
-#include
-#include
-#include
-#include
-
-#include
-#include
-#include