Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

PACKAGE_PREFIX_DIR points to wrong directory #643

Open
mferland opened this issue Jul 29, 2024 · 0 comments
Open

PACKAGE_PREFIX_DIR points to wrong directory #643

mferland opened this issue Jul 29, 2024 · 0 comments

Comments

@mferland
Copy link

Not totally sure, but it seems as if the PACKAGE_PREFIX_DIR variable that is set in qt/cmake/AppStreamQtConfig.cmake.in is wrong.

For example, when building the 'libdiscover' library from KDE under the Yocto build system, I get the following build error:

| CMake Error in libdiscover/CMakeLists.txt:
|   Imported target "AppStreamQt" includes non-existent path
| 
|     "/path/to/build/tmp/work/core2-64-poky-linux/discover/6.1.3/recipe-sysroot/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.

The path should have been:

/path/to/build/tmp/work/core2-64-poky-linux/discover/6.1.3/recipe-sysroot/usr/include

instead of:

/path/to/build/tmp/work/core2-64-poky-linux/discover/6.1.3/recipe-sysroot/include

One way I got libdiscover to compile correctly is by appyling the following patch to appstream:

qt/cmake/AppStreamQtConfig.cmake.in
@@ -1,5 +1,5 @@
 
-get_filename_component(PACKAGE_PREFIX_DIR "${CMAKE_CURRENT_LIST_DIR}/../../../../" ABSOLUTE)
+get_filename_component(PACKAGE_PREFIX_DIR "${CMAKE_CURRENT_LIST_DIR}/../../../" ABSOLUTE)
 
 # Use original install prefix when loaded through a "/usr move"
 # cross-prefix symbolic link such as /lib -> /usr/lib.
-- 
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant