# How to fix warnings on foreing path for file GET\_RUNTIME\_DEPENDENCIES

**URL:** https://discourse.cmake.org/t/how-to-fix-warnings-on-foreing-path-for-file-get-runtime-dependencies/13781
**Category:** Usage
**Created:** [March 19, 2025, 5:30pm UTC](https://discourse.cmake.org/t/how-to-fix-warnings-on-foreing-path-for-file-get-runtime-dependencies/13781 "2025-03-19T17:30:59Z")
**Posts on this page:** 2
**Page:** 1

<div class="post-metadata">

### Author: ![KUGA2](https://discourse.cmake.org/user_avatar/discourse.cmake.org/kuga2/32/4968_2.png) [@KUGA2](https://discourse.cmake.org/u/KUGA2)
#### Post date: [March 19, 2025, 5:30pm UTC](https://discourse.cmake.org/t/how-to-fix-warnings-on-foreing-path-for-file-get-runtime-dependencies/13781/1 "2025-03-19T17:30:59Z")

</div>

Hi,

I used install(RUNTIME\_DEPENDENCY\_SET to install my binary and its dependencies. It depends on multiple other libs coming from other packages so it is not installed to /usr/lib (or similar).

The warning mentioned in doc occur:

 ![image](https://discourse.cmake.org/uploads/default/original/2X/d/dd183dd9f2bc2e182d245492be0050af838df3aa.png)

So my question is: How do i fix those warning? I can not copy those libs to system dirs, i do not want to change my system.  
Adding those paths to runpath (of the target that created the dependency set) also does not solve this.

---

<div class="post-metadata">

### Author: ![KUGA2](https://discourse.cmake.org/user_avatar/discourse.cmake.org/kuga2/32/4968_2.png) [@KUGA2](https://discourse.cmake.org/u/KUGA2)
#### Post date: [March 20, 2025, 12:33pm UTC](https://discourse.cmake.org/t/how-to-fix-warnings-on-foreing-path-for-file-get-runtime-dependencies/13781/2 "2025-03-20T12:33:40Z")

</div>

> Adding those paths to runpath (of the target that created the dependency set) also does not solve this.

I think this fixes it. The warnigns probably were from transitive dependencies which are not found looking in RUNPATH (CMake/linker set RUNPATH not RPATH).
