Skip to content

Commit

Permalink
Remove qt/tools/cmake/bin from PATH in kits
Browse files Browse the repository at this point in the history
If there is no cmake in envrionment PATH when the cmake extension is
activated, the cmake extension will not run. So it is useless to put
cmake exe path in kits environment `PATH`. the `cmake` executable
should either exist in environment PATH or be set via
`cmake.cmakePath`.

Change-Id: I9c6e6e25c11f7dd3fef50899f58e81f377d14f6b
Reviewed-by: Marcus Tillmanns <[email protected]>
  • Loading branch information
OrkunTokdemir committed Mar 4, 2024
1 parent fc4ad41 commit f5137b3
Showing 1 changed file with 3 additions and 13 deletions.
16 changes: 3 additions & 13 deletions src/util/get-qt-paths.ts
Original file line number Diff line number Diff line change
Expand Up @@ -230,15 +230,10 @@ export function qtRootByQtInstallation(installation: string) {
}

export function generateEnvPathForQtInstallation(installation: string) {
const qtRootDir = qtRootByQtInstallation(installation);
const cmakeDirPath = locateCMakeExecutableDirectoryPath(qtRootDir);
const installationBinDir = path.join(installation, 'bin');
const QtPathAddition = [
installation,
installationBinDir,
'${env:PATH}',
cmakeDirPath
].join(path.delimiter);
const QtPathAddition = [installation, installationBinDir, '${env:PATH}'].join(
path.delimiter
);
return QtPathAddition;
}

Expand Down Expand Up @@ -281,11 +276,6 @@ export async function envPathForQtInstallation(installation: string) {
return qtPathEnv;
}

export function locateCMakeExecutableDirectoryPath(qtRootDir: string) {
// TODO: check if cmake exists in PATH already
return path.join(qtToolsDirByQtRootDir(qtRootDir), 'CMake_64', 'bin');
}

export async function queryHostBinDirPath(
selectedQtPath: string
): Promise<string> {
Expand Down

0 comments on commit f5137b3

Please sign in to comment.