Conan: Fix how conans.model.options.PackageOption value is evaluated
The default value None returned by tools.get_safe is not the Python's built-in None value. The value returned by tools.get_safe() is wrapped into conans.model.options.PackageOption and to check against 'None' it needs to follow pattern: if not <value>: Change-Id: Idacfdde92958a46d399246239d12cd887916c4f1 Reviewed-by: Toni Saario <toni.saario@qt.io> (cherry picked from commit a536734b9c94b2af10b70d09cb7609b58c5fb908) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
This commit is contained in:
parent
9494d8d441
commit
d8ad9f9b05
@ -157,7 +157,7 @@ class QtBase(ConanFile):
|
||||
# When cross-building the user needs to pass 'qt_host_path' which is transformed to
|
||||
# QT_HOST_PATH later on. Resolve the exact path.
|
||||
qt_host_path = self.options.get_safe("qt_host_path")
|
||||
if qt_host_path is None:
|
||||
if not qt_host_path:
|
||||
raise QtConanError("Expected 'qt_host_path' option in cross-build context")
|
||||
return str(Path(os.path.expandvars(str(qt_host_path))).expanduser().resolve(strict=True))
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user