Assimp's CMake config files are malformed

Bug #1882427 reported by Silvio Traversaro
14
This bug affects 3 people
Affects Status Importance Assigned to Milestone
assimp (Ubuntu)
Fix Committed
Undecided
IOhannes m zmoelnig

Bug Description

The CMake config files shipped with the libassimp-dev package in Ubuntu 20.04 are malformed, and export the wrong include directories.

I prepare a minimal reproducible example in https://gist.github.com/traversaro/1046013d018ff998fac1cea6987be7e0 .

To reproduce it, just compile it as:
git clone https://gist.github.com/traversaro/1046013d018ff998fac1cea6987be7e0
cd 1046013d018ff998fac1cea6987be7e0
chmod +x build.sh
./build.sh

This will fail with the message:
~~~
-- Detecting CXX compile features - done
CMake Warning (dev) at /usr/lib/x86_64-linux-gnu/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/lib/x86_64-linux-gnu/cmake/assimp-5.0/assimp-config.cmake:1 (include)
  CMakeLists.txt:4 (find_package)
This warning is for project developers. Use -Wno-dev to suppress it.

-- Configuring done
CMake Error in CMakeLists.txt:
  Imported target "assimp::assimp" includes non-existent path

    "/usr/lib/include"

  in its INTERFACE_INCLUDE_DIRECTORIES. Possible reasons include:

  * The path was deleted, renamed, or moved to another location.

  * An install or uninstall procedure did not complete successfully.

  * The installation package was faulty and references files it does not
  provide.

CMake Error in CMakeLists.txt:
  Imported target "assimp::assimp" includes non-existent path

    "/usr/lib/include"

  in its INTERFACE_INCLUDE_DIRECTORIES. Possible reasons include:

  * The path was deleted, renamed, or moved to another location.

  * An install or uninstall procedure did not complete successfully.

  * The installation package was faulty and references files it does not
  provide.
~~~

Downstream bug: https://github.com/robotology/idyntree/issues/693 .

description: updated
description: updated
description: updated
description: updated
Revision history for this message
Launchpad Janitor (janitor) wrote :

Status changed to 'Confirmed' because the bug affects multiple users.

Changed in assimp (Ubuntu):
status: New → Confirmed
Revision history for this message
Paul Keir (pkeir) wrote :

This affects me too, on Ubuntu 20.10. I actually noticed it first when using Vcpkg (on Ubuntu).

Revision history for this message
IOhannes m zmoelnig (umlaeute) wrote :

this was fixed with assimp-5.1 which will be part of Ubuntu starting with jammy (22.04)

Changed in assimp (Ubuntu):
assignee: nobody → IOhannes m zmoelnig (umlaeute)
status: Confirmed → Fix Committed
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.