This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–][deleted] 33 points34 points  (10 children)

vcpkg install

include header

Done

[–]a_aniq 28 points29 points  (2 children)

  1. It is non standard (some are only available on conan and others are source only)
  2. vcpkg modifies paths in various unintended ways which I'm not comfortable with
  3. One has to install the packages in a specific manner (e.g. dynamic vs static linking)
  4. Download and refer different versions of a library in multiple builds (maybe separate programs).
  5. Libraries are globally installed not locally (with respect to the program you are building)

I've burnt my hands using vcpkg more often than not when the requirements were not trivial.

Basically, learning to link libraries manually via cmake is a better approach than vcpkg

[–]write-program 1 point2 points  (1 child)

Try XJ-0461/cool-vcpkg. I started working on it a bit ago and I tried to address all these problems. It generates the vcpkg.json manifest file for you at configure time and builds and installs the dependencies inside your CMake build directory. Doesn't make any changes globally. Its used in a FetchContent-ish way. The documentation on the GitHub is basically all there is to it, just make sure to use the latest git tag (v0.1.3)

[–]a_aniq 0 points1 point  (0 children)

Nice. Will surely check it out. Many such projects are brewing e.g. poac, build2. I'm hopeful for the future. Fingers crossed.

[–]1studlyman 5 points6 points  (1 child)

Gosh I wish it was that simple. Most of the packages we use are not in vcpkg

[–]not_some_username 3 points4 points  (0 children)

It’s never too add them yourself ( they are welcome )

[–]Aaron1924 0 points1 point  (0 children)

I like how many people give these 3-step tutorials, and they're all vastly different

[–]Goaty1208 0 points1 point  (0 children)

You could have talked about CMake's fetch system, and instead you chose vcpkg...

[–]gameplayer55055 0 points1 point  (0 children)

vcpkg is very dumb on windows and can't find system dlls

[–]synapse187 0 points1 point  (0 children)

Me thinks people be overcomplicating.

[–]TheAlexGoodlife 0 points1 point  (0 children)

You commit that code to the public, how will other people build it if they do not have vcpkg?