New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
assimpTargets.cmake issue on Linux #2719
Comments
I don't really know much CMake, but it seems to me that the proper path to search for list(APPEND _IMPORT_CHECK_FILES_FOR_assimp::assimp "${ASSIMP_ROOT_DIR}/@ASSIMP_LIB_INSTALL_DIR@/${sharedLibraryName}" ) |
see https://salsa.debian.org/debian/assimp/blob/master/debian/patches/cmake.patch for the full patch. The patch is of course a bit hack-and-slash, as we only need to care about "proper" installations. |
I get the same problem while compiling https://github.com/dfranx/SHADERed on Gentoo. The problem is mentioned here, also: https://bugs.gentoo.org/701912
|
Why not just use GNUInstallDirs and get rid of all this hackery that breaks down on every other corner? |
Is in, good luck! |
the cmake-configuration for 3rd-party consumers is somewhat broken on Linux.
I'm currently preparing the Debian packages for assimp-5.0.0, and test-compiling 3rd-party software (
ros-*
) that uses assimp/cmake now fails.I narrowed it down to cmake to being able to find the
libassimp.so.5
file (which of course is present on the system).assimp's cmake configuration is installed into
/usr/lib/x86_64-linux-gnu/cmake/assimp-5.0/
assimp's shared library is installed as
/usr/lib/x86_64-linux-gnu/libassimp.so.5
assimpTargets.cmake
calculates the_IMPORT_PREFIX
as/usr/lib/x86_64-linux-gnu/cmake/assimp-5.0/../../../
which in the end resolves to/usr/lib
: https://github.com/assimp/assimp/blob/v5.0.0/assimpTargets.cmake.in#L44-L48for shared-lib builds on non-windows systems, a file-check is added for
${_IMPORT_PREFIX}/lib/${sharedLibraryName}
, which really resolves to/usr/lib/lib/libassimp.so.5
: https://github.com/assimp/assimp/blob/v5.0.0/assimpTargets-release.cmake.in#L79since there is no
/usr/lib/lib/libassimp.so.5
file (esp. note the/lib/lib
) , any call tofind_package(ASSIMP)
fails :-(The text was updated successfully, but these errors were encountered: