Uploaded image for project: 'Qt'
  1. Qt
  2. QTBUG-74770

Qt6: Evaluate vcpkg package manager from developer perspective (Vitaly)

    XMLWordPrintable

Details

    • Task
    • Resolution: Done
    • P2: Important
    • None
    • None
    • Packaging & Installer
    • None

    Description

      Some notes:

      Brief: https://github.com/Microsoft/vcpkg 

      FAQ: https://vcpkg.readthedocs.io/en/latest/about/faq/ 

      Doc: https://vcpkg.readthedocs.io/en/latest/ 

      Pros:

      • Easy to install. 
      • Win/Mac/Linux are supported. 
      • Easy to start using: you need to only specify one more parameter when invoking “cmake” command. 
      • When you install a package using vcpkg, all transitive dependencies are handled for you. 
      • Only CMake is required. 
      • It’s possible to: use pre-build binaries, use achieved libraries, use packages from github. 
      • Supports NuGet packages. 
      • It’s possible to specify shared/static, dependency version, and target platform. 
      • Good integration with Microsoft VS/Code 
      • You need to provide only two files for each dependency: CONTROL – version info and so on, and profile.cmake -- CMake script to build/install the dependency itself. 
      • Qt is already available as a package 

       Cons:

      • When you’re removing a package, none of unused transitive dependencies are removed. 
      • When you’re building with CMake, transitive dependencies aren’t handled. For example, if your app depends on libcurl, you have to manually specify all other dependencies (openssl, zlib, pthreads). 
      • When you’re building with CMake, searching dependencies is “leaking”: some system dependencies might be located. 
      • When start building with CMake, all dependencies won’t be automatically downloaded, installed and build. 
      • You have to use crap-like CMake syntax for scripting by default. Because everything is CMake, actually. 

      Summary:

      My impression is we can use this build system, and it would be easy to integrate it with Qt, especially because we can merge it with current CMake files without any problems. This is also possible to specify SHA1 of a particular commit of submodule with source/prebuilt binary. The fact that we don’t need any extra languages is nice as well, it means that there should be slightly less problems with using on systems like Windows. Default packages list is also wide enough. 

      On the other hand, there are some problems with auto dependency handling. Nothing will be automatically downloaded, built, and installed. I see potential problem with using system wide dependencies instead of pre-packaged. This problem is appeared at least on Linux. On Windows it should just fail a build. 

      Attachments

        Issue Links

          No reviews matched the request. Check your Options in the drop-down menu of this sections header.

          Activity

            People

              vitaly.fanaskov Vitaly Fanaskov
              olhirvon Olli Hirvonen
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Gerrit Reviews

                  There are no open Gerrit changes