Now the configs follows the standard cmake-package code: see https://cmake.org/cmake/help/v3.12/manual/cmake-packages.7.html
Downstreamer no longer have to manually specify target_include_directories with ${ASSIMP_INCLUDE_DIRS}, target_link_libraries with ${ASSIMP_LIBRARY_DIRS} and so on.
Downstreamer can now use:
find_package(assimp CONFIG REQUIRED)
target_link_libraries(AWESOME_APP PUBLIC assimp::assimp)
and everything should work.
Added assimpTargets.cmake.in
Added assimpTargets-debug.cmake.in
Added assimpTargets-release.cmake.in
Modified CMakeLists.txt
Modified code/CMakeLists.txt - added ALIAS assimp::assimp
Tested on Ubuntu 18.04 and Windows 10
Since the ASSIMP_LIB_INSTALL_DIR where this CMake config file is
installed to may contain multiple nested directories, we should not use
it to back-calculate the location of the ASSIMP_ROOT_DIR unless we can
take the directory depth into account. Instead use the
CMAKE_INSTALL_PREFIX as the ASSIMP_ROOT_DIR at configure-time.
This approach is more flexible with respect to install directories but
it means that assimp files are not relocatable after installation and I
don't think it works if a DESTDIR option is provided when running `make
install` after cmake configuration.