# RPATH not set, but necessary

**URL:** https://discourse.cmake.org/t/rpath-not-set-but-necessary/861
**Category:** Code
**Tags:** os:macos
**Created:** [March 25, 2020, 5:51pm UTC](https://discourse.cmake.org/t/rpath-not-set-but-necessary/861 "2020-03-25T17:51:50Z")
**Posts on this page:** 1
**Showing post:** 3

<div class="post-metadata">

### Author: ![CodingNickNick](https://discourse.cmake.org/user_avatar/discourse.cmake.org/codingnicknick/32/445_2.png) [@CodingNickNick](https://discourse.cmake.org/u/CodingNickNick)
#### Post date: [March 25, 2020, 7:23pm UTC](https://discourse.cmake.org/t/rpath-not-set-but-necessary/861/3 "2020-03-25T19:23:25Z")

</div>

It’s macOS! 🍎

Okay, thanks! That’s helpful. So the only option for now is to propagate the BUILD\_RPATH requirements myself?

As for the other part of the question: how do the other targets achieve this? I read on the [RPATH page of the wiki](https://gitlab.kitware.com/cmake/community/-/wikis/doc/cmake/RPATH-handling):

> When building a target with RPATH, CMake determines the RPATH by  
> using the directories of all libraries to which this target links.

Shouldn’t this also happen for my bar::bar target, or is it because the LC\_ID\_DYLIB, the install name, contains @rpath that this mechanism doesn’t kick in or something?

Thanks again!

---

_[View the full topic](https://discourse.cmake.org/t/rpath-not-set-but-necessary/861)._
