You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Documentation on using AssimpImporter recommends building assimp as a subproject:
add_subdirectory(assimp EXCLUDE_FROM_ALL)
add_library(Assimp::Assimp ALIAS assimp)
But I prefer to keep them globally installed, so I was trying to get that to work, and what I have noticed is that FindMagnumPlugins refers to it this way:
But pulling assimp from the master right now, I have noticed that it perfectly installs and provides assimp package with assimp::assimp as a target, and if I go ahead and change that to
The (uppercase) Assimp package is searched for and exposed by magnum's own FindAssimp.cmake, so you'll need to copy that file into your modules/ dir along with FindMagnumPlugins. The docs mention both ways, either a subproject setup or a system-wide installation, so you probably just missed the part that suggested to take the FindAssimp module also.
That said, if you have an idea how to make the docs clearer, let me know, I'll fix them.
The reason why magnum has its own FindAssimp instead of find_package(assimp CONFIG), btw., is because historically Assimp didn't provide a CMake imported target, it was missing various parts, or distributions didn't ship the cmake files from it. Plus find_package(assimp CONFIG) wouldn't work with Assimp as a CMake subproject, so the Find module kinda abstracts that away.
Ok, I think there's nothing left to do here. A related issue is mosra/magnum#436, which could avoid the need to explicitly copy the FindAssimp.cmake. Closing this in favor of that one.
Documentation on using AssimpImporter recommends building assimp as a subproject:
But I prefer to keep them globally installed, so I was trying to get that to work, and what I have noticed is that FindMagnumPlugins refers to it this way:
But pulling assimp from the master right now, I have noticed that it perfectly installs and provides assimp package with assimp::assimp as a target, and if I go ahead and change that to
then it works and finds it correctly.
The text was updated successfully, but these errors were encountered: