Is your feature request related to a problem? Please describe.
Some CMake ports set the VERSION target for the installed executable, that on Linux as the effect that executable_name is not a real executable, but just a symlink to the real executable called executable_name-version (see the NAMELINK-related options in https://cmake.org/cmake/help/v3.17/command/install.html#installing-targets for more details).
The current form of vcpkg_copy_tools ignores the real executable called executable_name-version, and just copy in tools/${PORT} the symlink executable_name.
Proposed solution
I do not have a solution, I opened the issue so we can have a space where to discuss a possible solution.
Possible solutions include:
vcpkg_copy_tools to also find and install tools in the form toolsname-{version} VERSION properties in the executablesHmm maybe idiotic idea. But why not pass -DCMAKE_RUNTIME_OUTPUT_DIRECTORY=${CURRENT_PACKAGES_DIR}/tools/${port} via vcpkg_configure_cmake for everything except windows?
Hmm maybe idiotic idea. But why not pass
-DCMAKE_RUNTIME_OUTPUT_DIRECTORY=${CURRENT_PACKAGES_DIR}/tools/${port}viavcpkg_configure_cmakefor everything except windows?
I don't know, I am afraid that mixing the logic of where to place build artifacts and where to install them can have several unwanted consequences.
Recursive copy the file until its not a symlink ?
https://cmake.org/cmake/help/v3.14/command/file.html: file(READ_SYMLINK <linkname> <out-var>)
cc @BillyONeal