Public bug reported: I tried to use this package when building VTK from source, by passing the flag
-Dpugixml_DIR=/usr/share/libpugixml-dev/cmake to the CMake configure step. This failed with CMake Error at /usr/share/libpugixml-dev/cmake/pugixml-config.cmake:87 (message): The imported target "pugixml" references the file "/lib/x86_64-linux-gnu/libpugixml.so.1.8" 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/share/libpugixml-dev/cmake/pugixml-config.cmake" but not all the files it references. Call Stack (most recent call first): CMake/vtkModuleMacros.cmake:891 (find_package) ThirdParty/pugixml/CMakeLists.txt:1 (vtk_module_third_party) Looking at /usr/share/libpugixml-dev/cmake/pugixml-config.cmake, this section of code: # Compute the installation prefix relative to this file. get_filename_component(_IMPORT_PREFIX "${CMAKE_CURRENT_LIST_FILE}" PATH) # Use original install prefix when loaded through a # cross-prefix symbolic link such as /lib -> /usr/lib. get_filename_component(_realCurr "${_IMPORT_PREFIX}" REALPATH) get_filename_component(_realOrig "/usr/lib/x86_64-linux-gnu/cmake/pugixml" REALPATH) if(_realCurr STREQUAL _realOrig) set(_IMPORT_PREFIX "/usr/lib/x86_64-linux-gnu/cmake/pugixml") endif() unset(_realOrig) unset(_realCurr) get_filename_component(_IMPORT_PREFIX "${_IMPORT_PREFIX}" PATH) get_filename_component(_IMPORT_PREFIX "${_IMPORT_PREFIX}" PATH) get_filename_component(_IMPORT_PREFIX "${_IMPORT_PREFIX}" PATH) get_filename_component(_IMPORT_PREFIX "${_IMPORT_PREFIX}" PATH) if(_IMPORT_PREFIX STREQUAL "/") set(_IMPORT_PREFIX "") endif() seems to arrive at a ${_IMPORT_PREFIX} of "", which means e.g. set_target_properties(pugixml PROPERTIES IMPORTED_LOCATION_NOCONFIG "${_IMPORT_PREFIX}/lib/x86_64-linux-gnu/libpugixml.so.1.8" IMPORTED_SONAME_NOCONFIG "libpugixml.so.1" ) in /usr/share/libpugixml-dev/cmake/pugixml-config-noconfig.cmake will become wrong ("/lib/x86_64-linux-gnu/libpugixml.so.1"), leading to config error. Looks like the calculation of ${_IMPORT_PREFIX} is wrong, not sure if this is because of some wrong assumption that doesn't hold. Seems to make it impossible to use this package from a CMake-using project (using -Dpugixml_DIR). ** Affects: pugixml (Ubuntu) Importance: Undecided Status: New -- You received this bug notification because you are a member of Ubuntu Bugs, which is subscribed to Ubuntu. https://bugs.launchpad.net/bugs/1799660 Title: CMake config file references files with wrong path To manage notifications about this bug go to: https://bugs.launchpad.net/ubuntu/+source/pugixml/+bug/1799660/+subscriptions -- ubuntu-bugs mailing list ubuntu-bugs@lists.ubuntu.com https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs