# Feature Request: install(TARGETS RUNTIME\_DEPENDENCIES) should add $\<TARGET\_RUNTIME\_DLL\_DIRS:...\>

**URL:** https://discourse.cmake.org/t/feature-request-install-targets-runtime-dependencies-should-add-target-runtime-dll-dirs/15650
**Category:** Development
**Tags:** os:windows
**Created:** [May 11, 2026, 6:56pm UTC](https://discourse.cmake.org/t/feature-request-install-targets-runtime-dependencies-should-add-target-runtime-dll-dirs/15650 "2026-05-11T18:56:44Z")
**Posts on this page:** 1
**Page:** 1

<div class="post-metadata">

### Author: ![dbs4261](https://discourse.cmake.org/user_avatar/discourse.cmake.org/dbs4261/32/4938_2.png) [@dbs4261](https://discourse.cmake.org/u/dbs4261)
#### Post date: [May 11, 2026, 6:56pm UTC](https://discourse.cmake.org/t/feature-request-install-targets-runtime-dependencies-should-add-target-runtime-dll-dirs/15650/1 "2026-05-11T18:56:44Z")

</div>

Simply put, CMake already knows if dependencies are stored in another directory because of the networks of target dependencies. So when installing runtime dependencies with `install(TARGETS … RUNTIME_DEPENDENCIES)` I can understand there being reasons not to automatically add `TARGET_RUNTIME_DLL_DIRS` so the search list, however, there should be a simple mechanism to add it. Notably, when I add it manually `install(TARGETS mytarget RUNTIME_DEPENDENCIES DIRECTORIES $<TARGET_RUNTIME_DLL_DIRS:mytarget>)` this does not expand correctly in the generated cmake\_install.cmake file because of list expansion. The generated `file(GET_RUNTIME_DEPENDENCIES)` call has all directories in a single string separated by semicolons, for example `"C:/A;C:/B"`, which does not work with `file(GET_RUNTIME_DEPENDENCIES)`. Manually separating the directories into `"C:/A" "C:/B"`works, but I am modifying a generated file, so it is not an actual solution.
