Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. Qt Creator and other tools
  4. VCPkg integration on Windows?
Forum Updated to NodeBB v4.3 + New Features

VCPkg integration on Windows?

Scheduled Pinned Locked Moved Unsolved Qt Creator and other tools
2 Posts 2 Posters 4.5k Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • W Offline
    W Offline
    wrosecrans
    wrote on last edited by wrosecrans
    #1

    Is there any supported way to have QMake / Qt Creator pull in packages installed using vcpkg? Currently, I have been adding every single package to my .pro file by hand, which is a massive pain when you have a few dependencies. Using one Boost library means having to manually add the INCLUDEPATH for every followon dependency, which is a massive pain, and not easy to make portable if I wanted to build on another system that might have vcpkg installed in another location. And the user on the other machine would have to manually install every package.

    Surely, this can't be the right way to do it. Is there some Qmake function, or Qt Creator plugin that I am missing that would simplify this? Ideally I would just be able to say something like "win32:vcpkg-depends: boost-filesystem" and be able to build.

    CONFIG(debug) {
        win32:LIBS += -L"C:/Users/wrose/Documents/development/vcpkg/packages/boost-filesystem_x64-windows/debug/lib"
        win32:LIBS += -L"C:/Users/wrose/Documents/development/vcpkg/packages/boost-system_x64-windows/debug/lib"
        win32:LIBS += -lboost_filesystem-vc140-mt-gd-1_66 -lboost_system-vc140-mt-gd-1_66
        message("Merry Debug")
    } else {
        win32:LIBS += -L"C:/Users/wrose/Documents/development/vcpkg/packages/boost-filesystem_x64-windows/lib"
        win32:LIBS += -L"C:/Users/wrose/Documents/development/vcpkg/packages/boost-system_x64-windows/lib"
        win32:LIBS += -lboost_filesystem-vc140-mt-1_66 -lboost_system-vc140-mt-1_66
        message("Happy Release")
    }
    
    
    
    
    win32:INCLUDEPATH += "C:/Users/wrose/Documents/development/vcpkg/packages/boost-filesystem_x64-windows/include"
    win32:INCLUDEPATH += "C:/Users/wrose/Documents/development/vcpkg/packages/boost-config_x64-windows/include"
    win32:INCLUDEPATH += "C:/Users/wrose/Documents/development/vcpkg/packages/boost-system_x64-windows/include"
    win32:INCLUDEPATH += "C:/Users/wrose/Documents/development/vcpkg/packages/boost-core_x64-windows/include"
    win32:INCLUDEPATH += "C:/Users/wrose/Documents/development/vcpkg/packages/boost-type-traits_x64-windows/include"
    win32:INCLUDEPATH += "C:/Users/wrose/Documents/development/vcpkg/packages/boost-predef_x64-windows/include"
    win32:INCLUDEPATH += "C:/Users/wrose/Documents/development/vcpkg/packages/boost-assert_x64-windows/include"
    win32:INCLUDEPATH += "C:/Users/wrose/Documents/development/vcpkg/packages/boost-iterator_x64-windows/include"
    win32:INCLUDEPATH += "C:/Users/wrose/Documents/development/vcpkg/packages/boost-mpl_x64-windows/include"
    win32:INCLUDEPATH += "C:/Users/wrose/Documents/development/vcpkg/packages/boost-preprocessor_x64-windows/include"
    win32:INCLUDEPATH += "C:/Users/wrose/Documents/development/vcpkg/packages/boost-static-assert_x64-windows/include"
    win32:INCLUDEPATH += "C:/Users/wrose/Documents/development/vcpkg/packages/boost-detail_x64-windows/include"
    win32:INCLUDEPATH += "C:/Users/wrose/Documents/development/vcpkg/packages/boost-smart-ptr_x64-windows/include"
    win32:INCLUDEPATH += "C:/Users/wrose/Documents/development/vcpkg/packages/boost-throw-exception_x64-windows/include"
    win32:INCLUDEPATH += "C:/Users/wrose/Documents/development/vcpkg/packages/boost-io_x64-windows/include"
    win32:INCLUDEPATH += "C:/Users/wrose/Documents/development/vcpkg/packages/boost-functional_x64-windows/include"
    win32:INCLUDEPATH += "C:/Users/wrose/Documents/development/vcpkg/packages/boost-range_x64-windows/include"
    
    
    1 Reply Last reply
    1
    • SGaistS Offline
      SGaistS Offline
      SGaist
      Lifetime Qt Champion
      wrote on last edited by
      #2

      Hi,

      From a quick look they provide integration for cmake. See here.

      That might be the quick and easy way to go.

      Interested in AI ? www.idiap.ch
      Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

      1 Reply Last reply
      0

      • Login

      • Login or register to search.
      • First post
        Last post
      0
      • Categories
      • Recent
      • Tags
      • Popular
      • Users
      • Groups
      • Search
      • Get Qt Extensions
      • Unsolved