# 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:** 1
**Showing post:** 7

<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: [September 3, 2020, 6:04pm UTC](https://discourse.cmake.org/t/get-runtime-dependencies-has-difficulties-with-windows-api-sets/1768/7 "2020-09-03T18:04:16Z")

</div>

> [@ben.boeckel](#):
>
> Maybe we could add something like `PRE_EXCLUDE_SYSTEM_LIBRARIES` which is defined to be some sensible, but still restricted set of libraries for each platform ( `libSystem.dylib` , `api-ms-*.dll` (and friends), and `libc.so` is about as high as I think we’d want to go).

Though this does open up a huge hole of keeping compatibility if we ever try to change it… Maybe we just have regexes for classes of libraries in a module?

```cmake
# CMakeSystemLibraryRegexes.cmake
set(CMAKE_SYSTEM_WINDOWS_API_DLLS "...")
set(CMAKE_SYSTEM_APPLE_LIBSYSTEM "...")

```

Then users can use them as wanted in `PRE_EXCLUDE_REGEXES` and we can add new variables as new “classes” of libraries appear?

---

_[View the full topic](https://discourse.cmake.org/t/get-runtime-dependencies-has-difficulties-with-windows-api-sets/1768)._
