# get\_prerequisites() tries to resolve system libraries even though advised not to

**URL:** https://discourse.cmake.org/t/get-prerequisites-tries-to-resolve-system-libraries-even-though-advised-not-to/1148
**Category:** Code
**Created:** [May 5, 2020, 10:02am UTC](https://discourse.cmake.org/t/get-prerequisites-tries-to-resolve-system-libraries-even-though-advised-not-to/1148 "2020-05-05T10:02:33Z")
**Posts on this page:** 1
**Showing post:** 2

<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: [November 9, 2020, 8:10pm UTC](https://discourse.cmake.org/t/get-prerequisites-tries-to-resolve-system-libraries-even-though-advised-not-to/1148/2 "2020-11-09T20:10:08Z")

</div>

These DLL names are “magical” in that they don’t exist. `get_prerequisites` doesn’t know they’re system until it finds them, but since it can’t find them, it is unhappy. I would recommend using [`file(GET_RUNTIME_DEPENDENCIES)`](https://cmake.org/cmake/help/latest/command/file.html#get-runtime-dependencies) instead which allows you to pass `PRE_EXCLUDE_REGEXES` to exclude these names from the resolution. See [this discussion](https://discourse.cmake.org/t/get-runtime-dependencies-has-difficulties-with-windows-api-sets/1768) potential solutions to making this a lot easier to manage.

---

_[View the full topic](https://discourse.cmake.org/t/get-prerequisites-tries-to-resolve-system-libraries-even-though-advised-not-to/1148)._
