AndreiM
AndreiM

Reputation: 886

How to use vcpkg packages with different triplets?

I have a project using 2 different packages, pkgA with triplet x86-windows-static, and pkgB, with triplet x86-windows.

When I try to compile my project, everything works fine for pkgA, since $(VcpkgRoot) is %userprofile%/vcpkg/installed/x86-windows-static, however, the headers from pkgB can't be found because they are in %userprofile%/vcpkg/installed/x86-windows.

How do I solve this problem?

Upvotes: 8

Views: 15142

Answers (2)

Dmitry Sazonov
Dmitry Sazonov

Reputation: 9014

I reached with the same issue. What I found is to write your own triplet and override a configuration for your libs. Example.

Upvotes: 9

Alexander Neumann
Alexander Neumann

Reputation: 2028

It is not intended to mix packages build with different triplets.

You probably want to define a custom triplet (x86-mytriplet) with per port customization (see https://github.com/microsoft/vcpkg/blob/master/docs/users/triplets.md) You can do so by copying one of the available triplets, rename it and make the desired changes in the triplet file. You can than use vcpkg install <whatever>:x86-mytriplet

Upvotes: 4

Related Questions