[CMake] Using relative paths with INSTALL

Timothy M. Shead tshead at sandia.gov
Mon Jun 8 13:14:11 EDT 2009


Brad King wrote:
> Timothy M. Shead wrote:
>> Folks:
>>
>> On a couple of occasions now I've recommended the use of relative paths 
>> with the OSX bundle installer - this to install files within the bundle 
>> in "nonstandard" locations.  It would be good to hear from the CMake 
>> gurus on whether relative paths are supported or not.  For example:
>>
>> INSTALL(FILES foo DESTINATION ../MacOS)
>>
>> ... note that this only makes sense within the context of an OSX bundle.
> 
> The install() command
> 
>    http://www.cmake.org/cmake/help/cmake2.6docs.html#command:install
> 
> interprets relative DESTINATION paths with respect to the installation
> prefix (CMAKE_INSTALL_PREFIX).  No other interpretation is supported.

The current behavior works fine, my question was whether relative paths 
outside the install prefix (i.e. paths starting with one or more "..") 
were officially sanctioned / officially discouraged.  This comes-up 
occasionally with the bundle generator, anytime someone wants to write a 
file outside the Resources directory (which is where the bundle 
generator maps the install prefix).

Cheers,
Tim

-- 
Timothy M. Shead
Data Analysis & Visualization (1424)
Sandia National Laboratories
505-284-0139



More information about the CMake mailing list