Conan: Install packages from Vcpkg using Conan

Created on 29 Jan 2019  路  5Comments  路  Source: conan-io/conan

If I understood correctly, the article Using Vcpkg ports as Conan packages
claims that one can install any package available via vcpkg with conan.

How can I install blaze 3.4-1?

I have tried a conanfile.txt with the following content.

[requires]
blaze/3.4-1@lasote/vcpkg

[generators]
cmake

[imports]
bin, *.dll -> ./bin
lib, *.dylib* -> ./bin

No luck.

question

All 5 comments

Hi @sursu

the post from https://blog.conan.io/2016/10/17/Using-Vcpkg-ports-as-Conan-packages.html, is very old, from 2016. Conan-center repository didn't exist at all, and Conan was very early 0.X.

That post illustrate how to create Conan packages from Vcpkg, and then use them. Those packages are not anymore in the conan public repos. You should use the available packages in existing public repos like conan-center or bincrafters:

$ conan search blaze* -r=conan-center
Existing package recipes:

blaze/3.3@conan/release

If the version you want is missing, the best is to submit an issue to the package author repo.

Thank you.
The issue was apparently already there.
The upgrade will come when blaze 3.5 is released.

Hi @memsharded

there appear to be some issues with conan-center as reported by Klaus here.

@lasote Is your "conanizer" tool still working? vcpkg has much much more ports available which makes it far better to start with. I wish there was an official tool which generates conan recipes from vcpkg ports instead of re-inventing the wheel.

Hi @bugproof

No, I don't think so, this was created very long time ago.
In any case, the flow for creating packages into ConanCenter has changed a lot. Now the process is done via Pull Requests in https://github.com/conan-io/conan-center-index, and ConanCenter builds hundreds of binaries automatically. This has improved, and more packages have been added to ConanCenter in the last months than were added in the last 3 years with the old process.

Also, we consider that the automatic usage of ports from vcpkg is no longer possible. For example, Conan packages do package multiple versions of the same library. When a new compiler version comes out, ConanCenter can rebuild all the different versions. As vcpkg only contains a snapshot of libraries and cannot manage different versions at the same time, it is not possible to automate this process. Also, the new Pull Request process has imposed a whole new set of automatic checks for recipes quality that cannot be guaranteed while importing from vcpkg.

In any case, at the speed that new packages are now being added to ConanCenter, we don't see a big problem here anymore, the community is catching up fast.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

uilianries picture uilianries  路  3Comments

tonka3000 picture tonka3000  路  3Comments

uilianries picture uilianries  路  3Comments

zomeck picture zomeck  路  3Comments

niosHD picture niosHD  路  3Comments