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.
Bad User Experience
The auto-generated usage information is wrong for many non-trivial ports.
Earlier reports
Known problem ports
azure-iot-sdk-c(lists 4 out of 10 targets in one line, too much)grpc(references amodulestarget, Install grpc error : Could not find a package configuration file provided by "modules" #17177)hdf5(listing all targets, which is too much)iir1(config in wrong dir, [iir1] find_package failed #23940)itk(promoting bad practice, see below, include ITK #22641)jsoncpp(3 targets in one line, [vcpkg-tool]vcpkg install <pkg>gives wrong usage information #20190 (comment))libpng(reporting different targets for static vs. dynamic instead of CMake Find module, [libpng] Add file usage.txt to describe the usage of port libpng #23379)openimageio(references aModuletarget, [openimageio] OpenImageIO Cmake rules are broken and the package is unusable #21234)openxr-loader(config in wrong dir, [openxr-loader] Fix package name and enable arm #23928)qhull(listing all targets, which is too much)qt5-base(listing targets which are private implementation details, and duplicate targets, cf. [qt5-base] build failure #14907 (comment))realsense2(lists four targets, [vcpkg-tool]vcpkg install <pkg>gives wrong usage information #20190 (comment))shapelib(no config file to match the proposed package name, [shapelib] Unable to find shp-config.cmake when including in build #16041, [vcpkg-tool]vcpkg install <pkg>gives wrong usage information #20190 (comment))Patched by usage file
arrow(references anarrow_bundled_dependencieslibrary which doesn't exist in absence of vendored dependencies, Arrow link error after installing on Ubuntu #20459)c-ares(listsc-ares::cares c-ares::cares_shared c-ares::cares_static)drogon(picks targets from conditionalfind_dependencyhelpers, [vcpkg-tool]vcpkg install <pkg>gives wrong usage information #20190 (comment))libiconv(see below, from [osg] build failure #14994; [iconv] How to use with vcpkg?vcpkg install iconvthen "Could not find a package configuration file" #22539)mailio(reports acmakepackage, [mailio] hint message after installing mailio is incorrect #23798)vtk(original output cf. [VTK] CMake usage printed by vcpkg is wrong #19035)Other resolved
effolkronium-random(config in wrong dir, [effolkronium-random] Properly handle package_name #20795)sentry-native(config in wrong dir, [sentry-native] Update to 0.4.17 #24309 (review))Misguided patching in vcpkg
libgeotiff1.6.1 ([libgeotiff] Fix packagename via find_package #15750 diverging from upstream)Promoting Bad Practice
All targets are listed in the same
target_link_librariesline. 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
Originally posted by @ssrlive in #14994 (comment)