Skip to content

Unable to build any package due to invalid path to vcpkg (missing platform in triplet name) #12086

@pistecid

Description

@pistecid

Describe the bug
Unable to build a project which uses any vcpkg library due to incorrect path to vcpkg headers/libs

Environment

  • OS: Windows
  • Visual Studio 2015

To Reproduce
Steps to reproduce the behavior:

  1. Clone vcpkg, build it
  2. Install any package
  3. Make integrate install
  4. Run visual studio, create empty project, try to use the package (e.g. include some header)

Expected behavior
No errors during compilation

Additional context
It looks like the problem is in $(VCPKG_ROOT)\scripts\buildsystems\msbuild\vcpkg.targets.
The default $(VcpkgUserTriplet) is initialized as $(PlatformTarget)-$(VcpkgOSTarget). In solution $(PlatformTarget) seems to be empty when usertriplet is calculated. The workaround is to specify $(VcpkgPlatformTarget) variable ( the same way it is defined in vcpkg.props) and use it instead of $(PlatformTarget)

Metadata

Metadata

Assignees

Labels

category:vcpkg-bugThe issue is with the vcpkg system (including helper scripts in `scripts/cmake/`)

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions