[CMake] installing targets under different name

Andy Cedilnik andy.cedilnik at kitware.com
Fri May 13 11:20:30 EDT 2005


Hi Alex,

Thinking a bit more about this, I come to this conclusion: It is dangerous.

Ok, installing library and changing name will break all executables,
because they refer to the library.

I think what we should really do is to add target property to rename
target. This way you could have:

ADD_LIBRARY(foo ...)
ADD_EXECUTABLE(fooExe ...)

SET_TARGET_PROPERTIES(fooExe PROPERTIES OUTPUT_NAME foo)

For all practical purposes the fooExe would be fooExe, except the
generator would produce foo instead of fooExe.

Much safer and cleaner.

             Andy

Alexander Neundorf wrote:

>Hi Andy, 
> 
>  
>
>>Von: Andy Cedilnik <andy.cedilnik at kitware.com> 
>>Hi Alex, 
>> 
>>I think maybe there should be another tag, something like: 
>> 
>>FILE(INSTALL DESTINATION "/usr/local/lib" TYPE FILE FILES 
>>OUTPUT_NAME "libkdevlop_something_or_another.so" 
>>"/usr/src/kde3-svn/kdevelop/lib/kdevelop/libkdevelop.so") 
>> 
>>Then we could use target property to set this name: 
>> 
>>SET_TARGET_PROPERTIES(kdevelop 
>>  PROPERTIES 
>>  INSTALL_OUTPUT_NAME "kdevelop_something_or_another") 
>> 
>>       Andy 
>>    
>>
> 
>hmm, well, but the tag "FILES" suggests that there can be more than one 
>file listed, so that it isn't obvious what happens if there is a 
>"OUTPUT_NAME" tag and more than one file  to install. 
> 
>Bye 
>Alex 
> 
>
>  
>


-- 
Andy Cedilnik
Kitware Inc.



More information about the CMake mailing list