# Setting RPATH and not RUNPATH for executable

**URL:** https://discourse.cmake.org/t/setting-rpath-and-not-runpath-for-executable/10011
**Category:** Code
**Created:** [February 6, 2024, 3:22am UTC](https://discourse.cmake.org/t/setting-rpath-and-not-runpath-for-executable/10011 "2024-02-06T03:22:49Z")
**Posts on this page:** 1
**Showing post:** 3

<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: [February 7, 2024, 8:54pm UTC](https://discourse.cmake.org/t/setting-rpath-and-not-runpath-for-executable/10011/3 "2024-02-07T20:54:50Z")

</div>

Yes, the behavior is up to the linker itself. Note that another difference is that `RPATH` entries are inherited (used when loading libraries loaded by the current library) where as `RUNPATH` entries are only used when loading libraries referenced from the library with the `RUNPATH` entry.

---

_[View the full topic](https://discourse.cmake.org/t/setting-rpath-and-not-runpath-for-executable/10011)._
