[CMake] turn CMAKE_SKIP_RPATHS on for one library or one subdirectory

Brad King brad.king at kitware.com
Thu Feb 16 17:19:49 EST 2006


Zachary Pincus wrote:
> I'm having trouble figuring out how to turn CMAKE_SKIP_RPATH on for a  
> single subdirectory (or for that matter, just one library).
> 
> I've tried all possible permutations of
> SET(CMAKE_SKIP_RPATH ON [CACHE BOOL "" [FORCE]])
> at the top of the CMakeLists.txt file in my subdirectory, but always  
> the lib is created with an rpath/install_name.
> 
> I'm on OS X, and the library type is SHARED. If I change the type to  
> MODULE, then no rpath/install_name information is ever generated,  
> regardless of the state of CMAKE_SKIP_RPATHS.
> 
> Can anyone shed any light on the situation?

CMAKE_SKIP_RPATH is meant as a global feature for use by package 
maintainers to avoid getting any RPATHs in the targets.

Cooincidentally I just added RPATH configuration support to CVS CMake 
today.  Read the documentation of the SET_TARGET_PROPERTIES command for 
details.

-Brad


More information about the CMake mailing list