[CMake] adding a 'make altinstall' to cmake?

Michael Hertling mhertling at online.de
Wed May 4 10:42:42 EDT 2011


On 05/04/2011 11:51 AM, Rolf Eike Beer wrote:
>> hi michael,
>>
>> thanks for the tip, this makes a lot of sense. unfortunately, the
>> following does not work:
>>
>>   add_custom_command(TARGET libopenrave POST_BUILD COMMAND
>> ${CMAKE_COMMAND} -E create_symlink $<TARGET_FILE_NAME:libopenrave0.3>
>> $<TARGET_FILE_NAME:libopenrave> )
>>
>> doing a grep on build.make, i see the following:
>>
>> /usr/bin/cmake -E create_symlink $<TARGET_FILE_NAME:libopenrave0.3>
>> $<TARGET_FILE_NAME:libopenrave>
>>
>> according to the documentation, the $<TARGET> stuff should have been
>> replaced right?
>>
>> using cmake 2.8.0
>                   ^
> 
> There is the bug. This needs to be 4.

Moreover, you may not say $<TARGET_FILE_NAME:libopenrave0.3> but
$<TARGET_FILE_NAME:libopenrave>0.3, supposed there is no actual
target "libopenrave0.3". However, the symlinks to the soname'd
libraries are automatically generated by CMake if the SOVERSION
or VERSION target property is set, so there should be no need to
do it yourself - in contrast to executables where the POST_BUILD
custom command is quite handy if you want to have them versioned,
too.

Regards,

Michael


More information about the CMake mailing list