How to use TARGET_RUNTIME_DLLS with find_package DLL of UNKNOWN type

I am using vcpkg on windows to add openssl and use it for a DLL target A which I then link against with executable B. This causes a well-known issue about A and its dependencies not being put into B’s output directory when building. Now I understand why this happens, I have read the documentation and the numerous issues that have been opened regarding this problem but I am yet to find the best practice on how to actually work around the limitations and achieve the desired behaviour where the output directory of executable B contains B.exe, A.dll and A’s openssl dll dependencies (eg in my case libcrypto and libssl dlls) after building. For reference, here is the relevant cmake code:

# root/libraryA/CMakeLists.txt
find_package(OpenSSL REQUIRED)
add_library(A SHARED)
target_sources(...)
target_include_directories(A PUBLIC ${OPENSSL_INCLUDE_DIR})
target_link_libraries(A PUBLIC OpenSSL::SSL OpenSSL::Crypto)

# root/executableB/CMakeLists.txt
add_executable(B B.cpp)
target_link_libraries(B PUBLIC A)

What is the recommended way of adding A and its dependencies to the output build folder of B?

IMO, the long-term path is to finish https://gitlab.kitware.com/cmake/cmake/-/merge_requests/5820 and then have find modules detect shared vs static libraries for the paths they provide.

Doesn’t help with the immediate issue though, sorry.