file(GET_RUNTIME_DEPENDENCIES) and cross-compiling

Reading the docs for file(GET_RUNTIME_DEPENDENCIES), it has statements of the form “On Linux platforms…”, “On Windows platforms…” and “On Apple platforms…”. The wording seems a bit ambiguous and it has made me wonder whether this subcommand is expected to work in a cross-compiling scenario or not. For example, if building on a Windows host and cross-compiling to an embedded platform that runs Linux, should we expect the subcommand to work?

CC: @kyle.edwards

Seems the following bug report discusses aspects related to this:

Cross compilation support for this is difficult and I don’t know if Kyle ended up implementing much of it other than “hope you have a tool that runs on the host and gives the right information”. Setting up the default search paths is certainly the difficult part here though.