Bug 142979

Summary: Foo.shell isn't named properly when using set_target_properties
Product: [Developer tools] buildsystem Reporter: Adam Treat <treat>
Component: KDE4 (cmake)Assignee: Alexander Neundorf <neundorf>
Status: RESOLVED INTENTIONAL    
Severity: normal    
Priority: NOR    
Version: unspecified   
Target Milestone: ---   
Platform: Compiled Sources   
OS: Linux   
Latest Commit: Version Fixed In:

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