install(RUNTIME_DEPENDENCY_SET): don't work if CMAKE_SYSTEM_NAME != CMAKE_HOST_SYSTEM_NAME (fails with CMakeError (cmake_install:51): file: unknown error)
I think that it's because the code near cmFileCommand.cxx:3000 makes assumption that our compiled artifact has the same system as the host, which in general is incorrect.
I also think that simply switching from CMAKE_HOST_SYSTEM_NAME
to CMAKE_SYSTEM_NAME
(if we are in crosscompiling or if CMAKE_SYSTEM_NAME
is actually exist) will be sufficient to fix this error as in this case CMake will know exact artifact type.
Edited by Alex