diff options
author | Iikka Eklund <iikka.eklund@qt.io> | 2022-03-17 14:01:33 +0200 |
---|---|---|
committer | Iikka Eklund <iikka.eklund@qt.io> | 2022-04-06 17:46:59 +0300 |
commit | 878984a014154f6ab2f92c223c61a44e02c74aec (patch) | |
tree | 35c3fa6a1167af1adb3bf709bfa7ef72c5111153 /conanfile.py | |
parent | 7c9afa8d00cc2bbc1b102eef6e76c23e07c7833f (diff) | |
download | qtbase-878984a014154f6ab2f92c223c61a44e02c74aec.tar.gz |
Conan: Resolve the 'qt_host_path' before assigning it to 'QT_HOST_PATH' env
The value of the 'qt_host_path' option needs to be resolved fully
before assigning it to 'QT_HOST_PATH' env.
This icludes expanding ~ constructs, resolving symlinks, expanding vars
and relative paths.
Pick-to: 6.2 6.3 6.3.0
Change-Id: Ia338105ccb4a203796864304f463b222163c5193
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
Diffstat (limited to 'conanfile.py')
-rw-r--r-- | conanfile.py | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/conanfile.py b/conanfile.py index 0e96f5d28f..57f54ded23 100644 --- a/conanfile.py +++ b/conanfile.py @@ -533,6 +533,14 @@ class QtBase(ConanFile): def package_info(self): self._shared.package_info(self) + if tools.cross_building(conanfile=self): + qt_host_path = self.options.get_safe("qt_host_path") + if qt_host_path is None: + raise QtConanError("Unable to cross-compile, 'qt_host_path' option missing?") + resolved_qt_host_path = str( + Path(os.path.expandvars(str(qt_host_path))).expanduser().resolve(strict=True) + ) + self.env_info.QT_HOST_PATH.append(resolved_qt_host_path) def package_id(self): # https://docs.conan.io/en/latest/creating_packages/define_abi_compatibility.html |