Skip to content

[vcpkg-tool] vcpkg install <pkg> gives wrong usage information #20190

@dg0yt

Description

@dg0yt

Bad User Experience

The auto-generated usage information is wrong for many non-trivial ports.

Earlier reports

Known problem ports

Patched by usage file

Other resolved

Misguided patching in vcpkg

Promoting Bad Practice

All targets are listed in the same target_link_libraries line. But normally, canonical usage is to use only a single desired target and let it pull in its transitive usage requirements.

Some package do export targets not as public interface, but as an implementation detail hidden behind interface variables. By automatic reporting of targes, vcpkg distracts user from applying canonical usage, contributors from researching, documenting and testing canonical usage, and team members to base there support answers on canonical usage.

Example: User experience for libiconv

but when i run the command vcpkg install libiconv, it always tell me

ubuntu@o-01:~/vcpkg$ vcpkg install libiconv
Computing installation plan...
The following packages are already installed:
    libiconv[core]:x64-linux -> 1.16#11
Package libiconv:x64-linux is already installed
Restored 0 packages from /home/ubuntu/.cache/vcpkg/archives in 1.052 us. Use --debug to see more details.

Total elapsed time: 37.06 us

The package libiconv provides CMake targets:

    find_package(iconv CONFIG REQUIRED)
    target_link_libraries(main PRIVATE Iconv::Charset)

please fix the issue.

Originally posted by @ssrlive in #14994 (comment)

Metadata

Metadata

Labels

Stalecategory:port-bugThe issue is with a library, which is something the port should already support

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions