prefix in ucx-targets.cmake need patch

Bug #2076529 reported by fxzjshm
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
ucx (Ubuntu)
New
Undecided
Unassigned

Bug Description

When referencing ucx::ucp in CMakeLists.txt, cmake gives error:
```
CMake Error in CMakeLists.txt:
  Imported target "ucx::ucp" 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.
```

Possibly caused by https://github.com/openucx/ucx/pull/9328 ("CMAKE: Use relative path for prefix"), which assumes location of ucx-targets.cmake being `$PREFIX/lib/cmake/ucx`, thus `${CMAKE_CURRENT_LIST_DIR}/../../..` gets correct prefix.

However when package is built with arch in libdir, e.g. "# Configured with: ... --prefix=/usr --libdir=${prefix}/lib/x86_64-linux-gnu ...", ucx-targets.cmake is at `/usr/lib/x86_64-linux-gnu/cmake/ucx/ucx-targets.cmake`, which requires extra ".." to get correct prefix.

Ubuntu release: Ubuntu 24.04 LTS
Package version: 1.16.0+ds-5ubuntu1, also checked package in Debian upstream (version 1.17.0+ds-3)

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.