[CMake] installing targets under different name
Andy Cedilnik
andy.cedilnik at kitware.com
Fri May 13 09:39:17 EDT 2005
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
Alexander Neundorf wrote:
>Hi Andy,
>
>
>
>>Von: Andy Cedilnik <andy.cedilnik at kitware.com>
>>
>>Hi Alex,
>>
>>Sounds like a great idea. Put a feature request and if you write a
>>patch, it would be even better. You may want to look in places like
>>cmTarget and cmInstallTargetCommand. Also, cmLocalGenerator has some
>>
>>
>code.
>
>I had a look at it.
>I expected to find commands like
>"cmake -E copy src/foo.exe /usr/bin/foo.exe" in the cmake_install.cmake
>file, which would have been quite easy to modify, but instead I found
>commands like:
>
>FILE(INSTALL DESTINATION "/usr/local/lib" TYPE FILE FILES
>"/usr/src/kde3-svn/kdevelop/lib/kdevelop/libkdevelop.so")
>
>this means FILE(INSTALL ...) is a new cmake command and it exptects as
>DESTINATION parameter a directory and as FILES parameters a list of
>files. This requires more changes to cmake, and I don't know which way
>you'd prefer (a change in the destination parameter, or the FILES, or
>something else.
>
>I added a feature request:
>
>http://www.cmake.org/Bug/bug.php?op=show&bugid=1846&pos=0
>
>Bye
>Alex
>
>
>
>>Alexander Neundorf wrote:
>>
>>
>>
>>>Hi,
>>>
>>>I still have the problem with a target "kdevelop" (for libkdevelop.so)
>>>and "kdevelop" for the executable in the same cmake project.
>>>One way to get around this would be to rename the binary e.g. to
>>>"kdevelop3", but then installing it as "kdevelop".
>>>This could e.g. be done via something like
>>>"SET_TARGET_PROPERTIES(kdevelop3 PROPERTIES INSTALL_AS kdevelop)"
>>>and then this new property could be used in cmLocalGenerator.cxx.
>>>
>>>What do you think about this ? If you think this would be ok, I'll try
>>>to write a patch.
>>>
>>>
>
>
>
>
--
Andy Cedilnik
Kitware Inc.
More information about the CMake
mailing list