Hi, I'm trying to convince CMake to do my bidding with regard to setting the RPATH on one of my executables, and it doesn't seem to be working as I think it should be (according to my understanding of the documentation).
I'm running CMake 2.8.10.2 on OS X 10.8.2, and using the Xcode generator. What I'm trying to accomplish is to set the RPATH of my executable to a custom value, say "../foo/bar/", and I understand that INSTALL_RPATH is the correct property to set. I also want this RPATH set immediately after building in the build tree, not just after installation, so I gather that I need to set BUILD_WITH_INSTALL_RPATH to true. So, I've tried something like this: add_executable(fizzbang ${HEADERS} ${SOURCES}) set_target_properties(fizzbang PROPERTIES INSTALL_RPATH "../foo/bar/" BUILD_WITH_INSTALL_RPATH ON) However, this doesn't seem to be having any effect; my executable does not have my custom RPATH set after building. Looking at the properties of the generated Xcode project and at the link line that Xcode executes for my executable, my custom RPATH value doesn't appear anywhere. The same exact CMake code yields the expected results on Linux using the Makefile generator. So, I'm wondering… does CMake's RPATH support (CMAKE_INSTALL_RPATH, CMAKE_BUILD_WITH_INSTALL_RPATH, etc., and the associated target-specific variants without the CMAKE_ prefix) work on OS X at all? Thanks! Matt -- Powered by www.kitware.com Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html Please keep messages on-topic and check the CMake FAQ at: http://www.cmake.org/Wiki/CMake_FAQ Follow this link to subscribe/unsubscribe: http://www.cmake.org/mailman/listinfo/cmake