Uploaded image for project: 'Qt Creator'
  1. Qt Creator
  2. QTCREATORBUG-32947

Adjust the search priority of the vcpkg executable in the package-manager/auto-setup.cmake script.

    XMLWordPrintable

Details

    • 7bcf4d1e0 (17.0)
    • All

    Description

      Adjust the search priority of the vcpkg executable in the [package-manager/auto-setup.cmake|https://github.com/qt-creator/qt-creator/tree/master/src/share/3rdparty/package-manager] script.

      {}Reasoning:{}
      Currently, Qt Creator's auto-setup script prioritizes globally installed instances of vcpkg over local project-specific ones. This behavior can be problematic, especially when using {}MSVC on Windows{}, as Visual Studio comes bundled with a pre-installed version of `vcpkg`. The bundled version is frequently chosen by the script, even when a different version exists within the project's directories.

      {}Proposed Change:{}
      Modify the search order so that the script prioritizes {}local project directories{} before checking the global environment. Specifically, it should look in:
      1. {}`<project_root>/vcpkg`{}
      2. {}`<project_root>/3rdparty/vcpkg`{}
      3. *Global vcpkg instances (`$ENV{VCPKG_ROOT}` and system paths)*

      {}Benefits:{}

      • Allows users to override the global `vcpkg` instance with a local one.
      • Helps prevent conflicts with the {}pre-bundled{} Visual Studio `vcpkg`, which is {}not frequently updated{} and may cause compatibility issues.
      • Offers more flexibility in managing different versions of `vcpkg` per project.

      Attachments

        For Gerrit Dashboard: QTCREATORBUG-32947
        # Subject Branch Project Status CR V

        Activity

          People

            cadam Cristian Adam
            mostafa_nanticock Mostafa Mahmoud
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes