Skip to content
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

Closed
umlaeute opened this issue Oct 18, 2019 · 5 comments
Closed

assimpTargets.cmake issue on Linux #2719

umlaeute opened this issue Oct 18, 2019 · 5 comments
Labels
Bug Global flag to mark a deviation from expected behaviour Build Global flag to mark build relates topics

Comments

@umlaeute
Copy link
Contributor

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).

@umlaeute
Copy link
Contributor Author

I don't really know much CMake, but it seems to me that the proper path to search for libassimp.so.5 would be ASSIMP_LIBRARY_DIRS instead.
So for now, I will just change https://github.com/assimp/assimp/blob/v5.0.0/assimpTargets-release.cmake.in#L79 to:

list(APPEND _IMPORT_CHECK_FILES_FOR_assimp::assimp "${ASSIMP_ROOT_DIR}/@ASSIMP_LIB_INSTALL_DIR@/${sharedLibraryName}" )

@umlaeute
Copy link
Contributor Author

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.

@kimkulling kimkulling added Bug Global flag to mark a deviation from expected behaviour Build Global flag to mark build relates topics labels Nov 16, 2019
@arakis
Copy link

arakis commented Mar 5, 2020

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

CMake Warning (dev) at /usr/lib64/cmake/assimp-5.0/assimpTargets.cmake:54 (if):
  if given arguments:

    "ON"

  An argument named "ON" appears in a conditional statement.  Policy CMP0012
  is not set: if() recognizes numbers and boolean constants.  Run "cmake
  --help-policy CMP0012" for policy details.  Use the cmake_policy command to
  set the policy and suppress this warning.
Call Stack (most recent call first):
  /usr/lib64/cmake/assimp-5.0/assimp-config.cmake:1 (include)
  CMakeLists.txt:147 (find_package)
This warning is for project developers.  Use -Wno-dev to suppress it.

CMake Error at /usr/lib64/cmake/assimp-5.0/assimpTargets.cmake:85 (message):
  The imported target "assimp::assimp" references the file

     "/usr/lib/libassimp.so.5"

  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

     "/usr/lib64/cmake/assimp-5.0/assimpTargets.cmake"

  but not all the files it references.

Call Stack (most recent call first):
  /usr/lib64/cmake/assimp-5.0/assimp-config.cmake:1 (include)
  CMakeLists.txt:147 (find_package)


-- Configuring incomplete, errors occurred!

@vmatare
Copy link
Contributor

vmatare commented Mar 31, 2020

Why not just use GNUInstallDirs and get rid of all this hackery that breaks down on every other corner?

Planning for Release V5.1 automation moved this from ToDo to Done Aug 20, 2021
@kimkulling
Copy link
Member

Is in, good luck!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug Global flag to mark a deviation from expected behaviour Build Global flag to mark build relates topics
Projects
No open projects
Development

No branches or pull requests

4 participants