# GET\_RUNTIME\_DEPENDENCIES has difficulties with windows API sets

**URL:** https://discourse.cmake.org/t/get-runtime-dependencies-has-difficulties-with-windows-api-sets/1768
**Category:** Code
**Created:** [September 2, 2020, 7:47am UTC](https://discourse.cmake.org/t/get-runtime-dependencies-has-difficulties-with-windows-api-sets/1768 "2020-09-02T07:47:37Z")
**Posts on this page:** 3
**Page:** 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: [May 20, 2022, 1:01pm UTC](https://discourse.cmake.org/t/get-runtime-dependencies-has-difficulties-with-windows-api-sets/1768/21 "2022-05-20T13:01:03Z")

</div>

> [@kyle.edwards](#):
>
> In the long term, I think the goal should be for CMake to parse the PE file format directly

While true, that doesn’t mean that such a flag isn’t necessary (or warranted for that matter).

---

<div class="post-metadata">

### Author: ![bramtayl](https://discourse.cmake.org/user_avatar/discourse.cmake.org/bramtayl/32/2931_2.png) [@bramtayl](https://discourse.cmake.org/u/bramtayl)
#### Post date: [July 4, 2023, 10:42am UTC](https://discourse.cmake.org/t/get-runtime-dependencies-has-difficulties-with-windows-api-sets/1768/22 "2023-07-04T10:42:05Z")

</div>

> [@ben.boeckel](#):
>
> Maybe we just have regexes for classes of libraries in a module?

Yes please! And maybe an EXCLUDE\_SYSTEM\_LIBRARIES flag or something

---

<div class="post-metadata">

### Author: ![AnyOldName3](https://discourse.cmake.org/user_avatar/discourse.cmake.org/anyoldname3/32/1456_2.png) [@AnyOldName3](https://discourse.cmake.org/u/AnyOldName3)
#### Post date: [August 26, 2026, 4:59pm UTC](https://discourse.cmake.org/t/get-runtime-dependencies-has-difficulties-with-windows-api-sets/1768/23 "2026-08-26T16:59:25Z")

</div>

It’s been six years and I’m not seeing any movement on a solution for this or even an issue on the tracker (although there’s this comment thread on the original MR [https://gitlab.kitware.com/cmake/cmake/-/merge\_requests/6186#note\_1324720](https://gitlab.kitware.com/cmake/cmake/-/merge_requests/6186#note_1324720)). At the moment, CMake’s not providing a mechanism to automatically or even easily exclude OS DLLs, and so forcing any project using `install(RUNTIME_DEPENDENCY_SET ...)` or `file(GET_RUNTIME_DEPENDENCIES ...)` to provide their own pile of fragile regex.

[Previous page](https://discourse.cmake.org/t/get-runtime-dependencies-has-difficulties-with-windows-api-sets/1768.md?page=1)
