# How exactly to find Mac Frameworks within app at runtime?

**URL:** <https://discourse.cmake.org/t/how-exactly-to-find-mac-frameworks-within-app-at-runtime/14150>\
**Category:** Code\
**Created:** [May 25, 2025, 3:16pm UTC](https://discourse.cmake.org/t/how-exactly-to-find-mac-frameworks-within-app-at-runtime/14150 "2025-05-25T15:16:12Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Joymaker](https://discourse.cmake.org/letter_avatar_proxy/v4/letter/j/59ef9b/32.png) [@Joymaker](https://discourse.cmake.org/u/Joymaker)\
**Post date:** [May 25, 2025, 3:16pm UTC](https://discourse.cmake.org/t/how-exactly-to-find-mac-frameworks-within-app-at-runtime/14150/1 "2025-05-25T15:16:12Z")

</div>

I’m trying to build for Mac OS in such a way that the linker finds Frameworks at link time and the executable finds them at runtime. Seems to me this should be absolute boilerplate, since the relative path within the app structure will always be the same:

```auto
app
    Contents
        Frameworks
        MacOS
            <executable>

```

So what I want to say while building is \<executable’s directory\>/../Frameworks .  
But I’m reading a lot of commentary with a lot of different answers. Is it RPATH? Is it MACOSX\_RPATH? And how exactly do I present that information within the CMake setting?

[This reference](https://duerrenberger.dev/blog/2021/08/04/understanding-rpath-with-cmake/) looks useful but involves so many ramifications that I can’t make sense of it.

Is there an easy path through the woods? A bit of boilerplate would be much appreciated.

---

<div class="post-metadata">

**Author:** ![perdrix](https://discourse.cmake.org/letter_avatar_proxy/v4/letter/p/a8b319/32.png) [@perdrix](https://discourse.cmake.org/u/perdrix)\
**Post date:** [May 27, 2025, 8:27am UTC](https://discourse.cmake.org/t/how-exactly-to-find-mac-frameworks-within-app-at-runtime/14150/2 "2025-05-27T08:27:40Z")

</div>

You may wish to use something like:

if(APPLE)  
set\_target\_properties(DeepSkyStacker PROPERTIES  
MACOSX\_BUNDLE ON  
:  
:  
INSTALL\_RPATH “@executable\_path/../Frameworks”  
)  
endif()
