1 From c36b6226479a20ebd910f355deddb9d5c7571213 Mon Sep 17 00:00:00 2001
2 From: Marc Ferland <marc.ferland@sonatest.com>
3 Date: Mon, 29 Jul 2024 09:35:51 -0400
4 Subject: [PATCH] Fix PACKAGE_PREFIX_DIR in qt/cmake/AppStreamQtConfig.cmake.in
6 PACKAGE_PREFIX_DIR points to an invalid directory. This breaks
7 librairies linking to appstream-qt.
9 For example, when building the 'discover' package from the meta-kde
10 layer we get the following build error:
12 | CMake Error in libdiscover/CMakeLists.txt:
13 | Imported target "AppStreamQt" includes non-existent path
15 | "/path/to/build/tmp/work/core2-64-poky-linux/discover/6.1.3/recipe-sysroot/include/"
17 | in its INTERFACE_INCLUDE_DIRECTORIES. Possible reasons include:
19 | * The path was deleted, renamed, or moved to another location.
21 | * An install or uninstall procedure did not complete successfully.
23 | * The installation package was faulty and references files it does not
26 The path above should've been:
28 /path/to/build/tmp/work/core2-64-poky-linux/discover/6.1.3/recipe-sysroot/usr/include/
32 /path/to/build/tmp/work/core2-64-poky-linux/discover/6.1.3/recipe-sysroot/include/
34 Upstream-Status: Inappropriate [upstream ticket https://github.com/ximion/appstream/issues/643]
36 Signed-off-by: Marc Ferland <marc.ferland@sonatest.com>
38 qt/cmake/AppStreamQtConfig.cmake.in | 2 +-
39 1 file changed, 1 insertion(+), 1 deletion(-)
41 diff --git a/qt/cmake/AppStreamQtConfig.cmake.in b/qt/cmake/AppStreamQtConfig.cmake.in
42 index 63df65f2..5ab2d0ec 100644
43 --- a/qt/cmake/AppStreamQtConfig.cmake.in
44 +++ b/qt/cmake/AppStreamQtConfig.cmake.in
47 -get_filename_component(PACKAGE_PREFIX_DIR "${CMAKE_CURRENT_LIST_DIR}/../../../../" ABSOLUTE)
48 +get_filename_component(PACKAGE_PREFIX_DIR "${CMAKE_CURRENT_LIST_DIR}/../../../" ABSOLUTE)
50 # Use original install prefix when loaded through a "/usr move"
51 # cross-prefix symbolic link such as /lib -> /usr/lib.