# Migration experiences / Comparison RUNTIME\_DEPENDENCY\_SET vs. fixup\_bundle (BundleUtilities)

**URL:** https://discourse.cmake.org/t/migration-experiences-comparison-runtime-dependency-set-vs-fixup-bundle-bundleutilities/11323
**Category:** Usage
**Created:** [July 25, 2024, 6:33am UTC](https://discourse.cmake.org/t/migration-experiences-comparison-runtime-dependency-set-vs-fixup-bundle-bundleutilities/11323 "2024-07-25T06:33:29Z")
**Posts on this page:** 1
**Showing post:** 6

<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: [August 9, 2024, 6:49am UTC](https://discourse.cmake.org/t/migration-experiences-comparison-runtime-dependency-set-vs-fixup-bundle-bundleutilities/11323/6 "2024-08-09T06:49:09Z")

</div>

> [@codeling](#):
>
> Regarding how to exclude the Windows system libraries, CMake Professional (18th ed) gives an example of adding
> 
> ```auto
> POST_EXCLUDE_REGEXES
> [[.*/system32/.*\.dll]]
> 
> ```
> 
> to the `install(RUNTIME_DEPENDENCY_SET` call, but using this I saw many .dlls from the system32 folder being copied to the final package. When I use `[[.*system32.*\.dll]]` instead it seems to work. I also tried \ instead of / but that also didn’t work. What’s the correct way of specifying a directory separator here?

I just retested this again now and I think I see the problem. While `[[.*/system32/.*\.dll]]` works for _most_ dependencies, it appears that internally some paths end up with `C:\Windows\system32/somedep.dll` as the path to compare against. Note the backslash before `system32` instead of a forward slash. The CMake documentation doesn’t make any statement about the path separators used when doing the regex matching, so unfortunately projects will have to account for both if they want their regex to work in all cases. I’ll add a note about this in the next edition of Professional CMake. A modified working example of the above would be:

```cmake
	POST_EXCLUDE_REGEXES
		[[.*(\\|/)system32(\\|/).*\.dll]]

```

---

_[View the full topic](https://discourse.cmake.org/t/migration-experiences-comparison-runtime-dependency-set-vs-fixup-bundle-bundleutilities/11323)._
