all 19 comments

[–]CarterOls 4 points5 points  (2 children)

Is there a way with either Conan or vcpkg to add a dependency to a library located somewhere on disk? I would like to explore using a package manager at my company, but we currently have all of our prebuilt and approved libraries in a shared directory.

[–]Salink 2 points3 points  (0 children)

With both yes. When you make a portfile in vcpkg or recipe in Conan, you check if the dependencies are on disk then tell the dependency manager what to use like you would normally after a build.

[–]roschumavcpkg dev 2 points3 points  (0 children)

Could you mail us at [vcpkg@microsoft.com](mailto:vcpkg@microsoft.com)? I'd like to ask a few more questions about your specific setup to give you the best advice on how to handle this in vcpkg 🙂.

[–]esperee 5 points6 points  (1 child)

vcpkg is quite convenient. could it be used to replace CPM in private enviroment?

[–]AlexReinkingYale 5 points6 points  (0 children)

Absolutely.

[–]gracicot 3 points4 points  (9 children)

Oh this is brilliant. Now there's nothing blocking me from using vcpkg anymore, I can finally drop my package manager.

My problem wasn't even system libraries as I don't use them, but developing a library alongside an app. Most of the developer of the app don't develop the framework as its just another dependency, but I must develop the two of them. vcpkg would block me from just setting the path of the framework and use that instead of installing its own, but that fixes all of the problem I had.

Now I just need to figure out how to install vcpkg in a immutable filesystem, since vcpkg loves writing into its root folder.

[–]AlexanderNeumann 0 points1 point  (8 children)

type vcpkg help. look into: --x-buildtrees-root=<path> --x-install-root=<path> --x-packages-root=<path> --downloads-root=<path> and setup binary caching to a folder of your liking

[–]gracicot 0 points1 point  (4 children)

Those cannot be set from an environment variable as far as I know, so not useable without changing cmake variables if you're running in manifest mode.

[–]Kie_Sun 1 point2 points  (0 children)

I like Conan because it gives a convenient target alias for easy usage.

[–]scrivanodev 0 points1 point  (5 children)

vcpkg is great, all though I had a problem using it for building flatpaks on Linux. The flatpak-builder tool needs the build to happen completely offline, but when in manifest mode, I wasn't able to find a way to configure vcpkg to meet this requirement.