[CMake] RPATH on Mac

tog guillaume.alleon at gmail.com
Sat Apr 16 09:00:29 EDT 2011


Dear all

Let's phrase it differently. Does CMake supports RPATH on the Mac platform ?
grep -i rpath /Applications/CMake\
2.8-4.app/Contents/share/cmake-2.8/Modules/Platform/* does not show
anything related to Darwin.


CMAKE_SHARED_LIBRARY_RUNTIME_C[X]*_FLAG does not seem to define on Darwin ?

Am I missing something ?

Best Regards

Guillaume

On Fri, Apr 15, 2011 at 4:47 PM, tog <guillaume.alleon at gmail.com> wrote:
> Dear all
>
> I have a project in which I would like to use rpath on Mac OS.
> Everything is going fine if I am building everything manually (i.e.
> without CMake)
>
> With CMake all is fine for the libs between the build and the
> installation, all libs are processed with install_name_tool.
> But nothing is done for the executable (checked from cmake_install.cmake)
>
> In the build phase, I don't see any -Wl,-rpath,... added on the command line.
>
> What do I miss there ?
>
> I have been using:
>
> SET(CMAKE_SKIP_BUILD_RPATH FALSE)
> SET(CMAKE_BUILD_WITH_INSTALL_RPATH FALSE)
> SET(CMAKE_INSTALL_RPATH_USE_LINK_PATH TRUE)
> SET(CMAKE_INSTALL_RPATH "${EXAMPLE_INSTALL_LIB_DIR}")
>
> as indicated in the Wiki.
>
> Is there  tool on the Mac to get rpath from the executable ?
>
>
> Thanks for your help
> Guillaume
>
> --
> PGP KeyID: 2048R/EA31CFC9  subkeys.pgp.net
>



-- 
PGP KeyID: 2048R/EA31CFC9  subkeys.pgp.net


More information about the CMake mailing list