Replies: 1 comment 2 replies
-
It can't be removed bacuse
Yes! |
Beta Was this translation helpful? Give feedback.
2 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
The current behavior of
X_VCPKG_APPLOCAL_DEPS_INSTALL
overwrites the built-ininstall(TARGETS ...)
command to do the following:dumpbin
,llvm-objdump
, orobjdump
to list a target's runtime dependency names (e.g.,libcrypto-3-x64.dll
,libssl-3-64.dll
,libpng16.dll
, etc.).vcpkg_installed
, which is the whole point).<install root>/bin
or the folder that the user provided ininstall(... [RUNTIME] DESTINATION ...)
.This is ostensibly a useful feature. However, I believe the vcpkg project would be better off leaving it out because it directly competes with CMake's built-in support for installing runtime dependencies,
install(RUNTIME_DEPENDENCY_SET ...)
.For one, there are a number of practical issues with reimplementing this behavior:
install
get updated: X_VCPKG_APPLOCAL_DEPS_INSTALL fails with install(... FILE_SET ...) #43243I think it is way easier and works better with the ecosystem to instead just provide documentation on how to install vcpkg-provided packages using built-in CMake features:
This is not perfect—there are plenty of weird workarounds necessary with this in practice. For instance, I need to manually exclude API sets and some random Windows DLLs that aren't actually DLLs:
In other projects, I have to manually include or exclude DLLs that are dynamically loaded, are the wrong version, etc.
However, these workarounds also will be needed in the vcpkg
install(...)
implementation if it becomes non-experimental. They would either have to be hardcoded in theapplocal.ps1
script (creating another maintenance burden when things break) or exposed to the user somehow.Basically, automatically finding dependency files for large projects gets very messy.
install(RUNTIME_DEPENDENCY_SET ...)
lets the user work around that messiness, and vcpkg provides the easiest part of that because it's already consolidated the DLLs invcpkg_installed/bin
.I have a feeling that both
X_VCPKG_APPLOCAL_DEPS_INSTALL
andinstall(RUNTIME_DEPENDENCY_SET ...)
are quite niche features, but I wanted to share my thoughts on this. What do you think?P.S.
add_executable
andadd_library
do similar things ifVCPKG_APPLOCAL_DEPS=ON
, but they copy DLLs next to the target file in the build tree instead of the install tree. I understand the usefulness here, since there is no similar built-in CMake way to copy runtime dependencies to the build tree. These also do not have the same practical issues with reparsing arguments. However, I would still encourage the toolchain file to usefile(GET_RUNTIME_DEPENDENCIES ...)
to find dependencies instead of a custom PowerShell script to reduce duplicate implementation and differences in behavior between build time and install time.Beta Was this translation helpful? Give feedback.
All reactions