diff options
| author | Orkun Tokdemir <orkun.tokdemir@qt.io> | 2024-10-23 15:08:14 +0200 |
|---|---|---|
| committer | Orkun Tokdemir <orkun.tokdemir@qt.io> | 2024-10-23 14:19:34 +0000 |
| commit | e2fd5ea1e746880b51d42d6246513206c23bd12b (patch) | |
| tree | 91496f0edf0e18c3c31e1d0a97ae482d0e5fd8fd /qt-cpp | |
| parent | 89e5a335f251d069318092c6e18737d5261d1319 (diff) | |
qt-cpp: Do not check for toolchain file in `Qt5` and `Qt`
Since the generation of `qt.toolchain.cmake` is added with `Qt6`, we
don't need to check for the file in `Qt5` and `Qt`.
Change-Id: I03a79eb6e9b6a027bb6ea96c5a13d635ed4b8248
Reviewed-by: Marcus Tillmanns <marcus.tillmanns@qt.io>
Diffstat (limited to 'qt-cpp')
| -rw-r--r-- | qt-cpp/src/util/get-qt-paths.ts | 18 |
1 files changed, 8 insertions, 10 deletions
diff --git a/qt-cpp/src/util/get-qt-paths.ts b/qt-cpp/src/util/get-qt-paths.ts index 1ef2c15..4b16bc5 100644 --- a/qt-cpp/src/util/get-qt-paths.ts +++ b/qt-cpp/src/util/get-qt-paths.ts @@ -103,17 +103,15 @@ export async function locateMingwBinDirPath(qtRootDir: string) { export async function locateCMakeQtToolchainFile(installation: string) { const libCMakePath = path.join(installation, 'lib', 'cmake'); - const qtVersions = ['Qt6', 'Qt5', 'Qt']; + const qtVersion = 'Qt6'; - for (const qtVersion of qtVersions) { - const cmakeQtToolchainFilePath = path.join( - libCMakePath, - qtVersion, - QtToolchainCMakeFileName - ); - if (await fsutil.exists(cmakeQtToolchainFilePath)) { - return cmakeQtToolchainFilePath; - } + const cmakeQtToolchainFilePath = path.join( + libCMakePath, + qtVersion, + QtToolchainCMakeFileName + ); + if (await fsutil.exists(cmakeQtToolchainFilePath)) { + return cmakeQtToolchainFilePath; } return ''; |
