Package: libc4core-dev
Version: 0.6.0-2
Severity: important
Control: forwarded -1 https://github.com/biojppm/cmake/issues/17


Dear maintainer,

Upstream dev makes a number of assumption on the filesystem layout,
that cause failure on Debian systems.
In practice it means that the cmake files can't be used when
the library is installed in multiarch dirs.

A simple
  find_package(c4core REQUIRED)

would fail with:
  CMake Error at /usr/lib/x86_64-linux-gnu/cmake/c4core/c4coreConfig.cmake:14 
(message):
    File or directory /usr/lib/include/ referenced by variable
    C4CORE_INCLUDE_DIR does not exist !


One "hack"/simple-solution is to tweak the upstream's assumption
with a simple patch like the one in attachement

The same problem will exist in src:rapidyaml when upgraded,
as it use the same "c4Project.cmake" file from the same upstream

Cheers,
Sébastien -- waiting for to dust to settle to upgrade another piece
             of software that depends on src:rapidyaml
--- a/cmake/c4Project.cmake
+++ b/cmake/c4Project.cmake
@@ -2789,7 +2789,7 @@
 # it points at the location of this file. So point it instead
 # to the CMAKE_INSTALL_PREFIX, in relative terms
 get_filename_component(PACKAGE_PREFIX_DIR
-    \"\${PACKAGE_PREFIX_DIR}/${cfg_dst_rel}\" ABSOLUTE)
+    \"\${PACKAGE_PREFIX_DIR}/${cfg_dst_rel}/..\" ABSOLUTE)
 
 set_and_check(${_c4_uprefix}INCLUDE_DIR \"@PACKAGE__INCLUDE_INSTALL_DIR@\")
 set_and_check(${_c4_uprefix}LIB_DIR \"@PACKAGE__LIBRARY_INSTALL_DIR@\")

Reply via email to