Details
-
Bug
-
Resolution: Done
-
P2: Important
-
6.0.0 Beta1
-
cc3f693029d6fcc65a0153b658061bd121a6af66
Description
At the head of qtbase/CMakeLists.txt there is a block of code that sets various PKG_CONFIG_* variables in case of crosscompiling. The patch that sets this misread my advise I gave in the CMake bugtracker.
If you want pkg-config to pick up your environment then you have to set it yourself, e.g. in a toolchain file (as I do). The downstream projects, in this case Qt, should not fiddle with it. It's the responsibility of the caller to set this up, I have to set up things like crosscompilers as well. If I set any of these variables to get things right then Qt will now unconditionally override them, injecting e.g. a totally wrong location for the .pc files. They are in ${sysroot}/usr/lib/pkgconfig for me, which I set up correctly.
This is nothing that upstream CMake has (or likely will) fix, this is how pkg-config has always worked.
Attachments
Issue Links
- relates to
-
QTBUG-86028 pkg-config should not look for host libraries when cross-compiling
-
- Closed
-