summaryrefslogtreecommitdiff
path: root/conanfile.py
diff options
context:
space:
mode:
authorIikka Eklund <iikka.eklund@qt.io>2021-01-25 15:14:58 +0200
committerIikka Eklund <iikka.eklund@qt.io>2021-01-29 08:57:51 +0000
commit1a758538fcb502f056bdadf7a88c9a2e35f9a6bc (patch)
treef2d3ee56cefad51f3df73c438daef33ef5c37227 /conanfile.py
parent49ebc508ee95888c1d5333010861301daf1ebc21 (diff)
downloadqtimageformats-1a758538fcb502f056bdadf7a88c9a2e35f9a6bc.tar.gz
conanfile.py: Use QTDIR instead of QT_PATH
There's an established environment variable for this though, QTDIR. This environment variable is also set by Qt Creator by default. So the Conan recipes should accept this environment variable instead. This requires a change in the matching conan profile files where the path to Qt installation is injected to env. Task-number: QTBUG-90583 Change-Id: I14408ba952dd5de652a52db26e85b8ca01dcfc88 Reviewed-by: Kai Koehne <kai.koehne@qt.io>
Diffstat (limited to 'conanfile.py')
-rw-r--r--conanfile.py8
1 files changed, 4 insertions, 4 deletions
diff --git a/conanfile.py b/conanfile.py
index 5b6ddd8..ca84e3d 100644
--- a/conanfile.py
+++ b/conanfile.py
@@ -54,11 +54,11 @@ class QtImageFormats(ConanFile):
pass
def _get_cmake_prefix_path(self):
- # 'QT_PATH' provided as env variable in profile file which is part of the Qt essential binary
+ # 'QTDIR' provided as env variable in profile file which is part of the Qt essential binary
# package(s). Installed under .conan/profiles
- cmake_prefix_path = os.environ.get("QT_PATH")
+ cmake_prefix_path = os.environ.get("QTDIR")
if not cmake_prefix_path:
- raise QtConanError("'QT_PATH' not defined! The 'QT_PATH' needs to point to Qt installation directory.")
+ raise QtConanError("'QTDIR' not defined! The 'QTDIR' needs to point to Qt installation directory.")
print(f"CMAKE_PREFIX_PATH for '{self.name}/{self.version}' build is: {cmake_prefix_path}")
return cmake_prefix_path
@@ -73,7 +73,7 @@ class QtImageFormats(ConanFile):
ext = ".bat" if tools.os_info.is_windows else ""
qtcmake = os.path.abspath(os.path.join(qt_install_path, "bin", "qt-cmake" + ext))
if not os.path.exists(qtcmake):
- raise QtConanError(f"Unable to locate {qtcmake} from 'QT_PATH': {qt_install_path}")
+ raise QtConanError(f"Unable to locate {qtcmake} from 'QTDIR': {qt_install_path}")
return qtcmake
def _get_cmake_tool(self):