# file(GET\_RUNTIME\_DEPENDENCIES) and cross-compiling

**URL:** https://discourse.cmake.org/t/file-get-runtime-dependencies-and-cross-compiling/3726
**Category:** Usage
**Created:** [July 11, 2021, 1:45am UTC](https://discourse.cmake.org/t/file-get-runtime-dependencies-and-cross-compiling/3726 "2021-07-11T01:45:17Z")
**Posts on this page:** 3
**Page:** 1

<div class="post-metadata">

### Author: ![craig.scott](https://discourse.cmake.org/user_avatar/discourse.cmake.org/craig.scott/32/20_2.png) [@craig.scott](https://discourse.cmake.org/u/craig.scott)
#### Post date: [July 11, 2021, 1:45am UTC](https://discourse.cmake.org/t/file-get-runtime-dependencies-and-cross-compiling/3726/1 "2021-07-11T01:45:17Z")

</div>

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

---

<div class="post-metadata">

### Author: ![craig.scott](https://discourse.cmake.org/user_avatar/discourse.cmake.org/craig.scott/32/20_2.png) [@craig.scott](https://discourse.cmake.org/u/craig.scott)
#### Post date: [July 11, 2021, 4:36am UTC](https://discourse.cmake.org/t/file-get-runtime-dependencies-and-cross-compiling/3726/2 "2021-07-11T04:36:20Z")

</div>

Seems the following bug report discusses aspects related to this:

[https://gitlab.kitware.com/cmake/cmake/-/issues/20753](https://gitlab.kitware.com/cmake/cmake/-/issues/20753)

---

<div class="post-metadata">

### Author: ![ben.boeckel](https://discourse.cmake.org/letter_avatar_proxy/v4/letter/b/ea5d25/32.png) [@ben.boeckel](https://discourse.cmake.org/u/ben.boeckel)
#### Post date: [July 13, 2021, 2:02pm UTC](https://discourse.cmake.org/t/file-get-runtime-dependencies-and-cross-compiling/3726/3 "2021-07-13T14:02:13Z")

</div>

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.
