Bug 142979 - Foo.shell isn't named properly when using set_target_properties
Summary: Foo.shell isn't named properly when using set_target_properties
Status: RESOLVED INTENTIONAL
Alias: None
Product: buildsystem
Classification: Developer tools
Component: KDE4 (cmake) (show other bugs)
Version: unspecified
Platform: Compiled Sources Linux
: NOR normal
Target Milestone: ---
Assignee: Alexander Neundorf
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2007-03-14 20:51 UTC by Adam Treat
Modified: 2008-06-10 23:33 UTC (History)
0 users

See Also:
Latest Commit:
Version Fixed In:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Adam Treat 2007-03-14 20:51:22 UTC
Version:            (using KDE Devel)
Installed from:    Compiled sources

For the Kst port I was having problems linking because kst's library (libkst) 
and executable (kst) share the same target name.  It seems that CMake doesn't 
support multiple targets with the same name even if they are of different 
types.

Looking at the documentation, it says that this can be fixed by calling the 
targets something different and then using:

  SET_TARGET_PROPERTIES(target1 target2 ...
                        PROPERTIES prop1 value1
                        prop2 value2 ...)

like so:

  SET_TARGET_PROPERTIES(fooexe PROPERTIES OUTPUT_NAME foo)

This works well, but the resultant file for launching is named 'fooexe.shell' 
and it calls tries to call a non-existent 'fooexe' ...
Comment 1 Alexander Neundorf 2007-03-20 23:08:33 UTC
Yes, this is a known problem.
One workaround could be not to rename the executable but to rename the library. Can you please try this ?

Alex
Comment 2 Alexander Neundorf 2008-06-10 23:33:54 UTC
Yes, this doesn't work and there is not really a good way to get this working with the KDE4_ADD_EXECUTABLE() macro as it is, inside that macro the script is created, but the OUTPUT_NAME property is set later on, too late for the script.

So please use the OUTPUT_NAME property for the libraries instead for the executables, this should work.
Please let me know if it doesn't.

Alex