Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions conan/tools/meson/meson.py
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,9 @@ def configure(self, reconfigure=False):
default=[], check_type=list)
cmd = "meson setup "
if is_cross_build:
#Do not let pkgconf prefix sysroot path in front of paths to Conan packages (that are
#outside the toolchain sysroot).
os.environ['PKG_CONFIG_FDO_SYSROOT_RULES'] = "1"
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Setting an environment variable this way is not correct, it will leave the environment dirty for other packages, etc. If anything, the approach would be in the MesonToolchain generator, to generate a Environment script with the necessary env-vars

machine_files.insert(0, cross)
cmd += " ".join([f'--cross-file "{file}"' for file in machine_files])
if os.path.exists(native):
Expand Down