title: Adding a rpath item to the build tree generated executable
body: <p>I always run my executable in the build tree (I don't run it from a cmake "install"). A library, let's call it <code>fruit</code>, is built as a framework:</p>
  
  <pre><code>add_library( fruit SHARED ${FRUIT_SOURCES} )
  set_target_properties( fruit PROPERTIES FRAMEWORK TRUE)
  set_target_properties( fruit PROPERTIES BUILD_WITH_INSTALL_RPATH TRUE
                               INSTALL_NAME_DIR "@rpath/Frameworks"   )
  </code></pre>
  
  <p>Now I want to set a custom rpath for main application (called <code>executable</code>) with cmake. I thought I could use the  <code>INSTALL_RPATH</code> target property of <code>executable</code> to define my rpaths for the generated program, but this seems to only work for an installed executable (remember I always run my application in the cmake build folder):</p>
  
  <pre><code># this rpath is not shown in the generated executable (otool -l -v executable):
  set_target_properties( executable PROPERTIES INSTALL_RPATH "@executable_path/lib/" ) 
  </code></pre>
  
  <p>How define/add a rpath item to the program generated in the build tree?</p>
  
  <p><strong>PS.</strong> This library <code>fruit</code> is just an example of my actual problem. The library is created in a sub cmake project (a git submodule) which adds the <code>BUILD_WITH_INSTALL_RPATH</code> property to the library. But I have the possibility to change the code for this project. Is there a better way to let my executable work in the build tree?</p>