Bug 415263

Summary: Make it clear that ECMAddAppIcon's sources must be added in executable target directly
Product: [Frameworks and Libraries] extra-cmake-modules Reporter: Alexander Potashev <aspotashev>
Component: generalAssignee: ecm-bugs-null <ecm-bugs-null>
Status: REPORTED ---    
Severity: normal    
Priority: NOR    
Version: 5.64.0   
Target Milestone: ---   
Platform: Microsoft Windows   
OS: Linux   
Latest Commit: Version Fixed In:

Description Alexander Potashev 2019-12-16 21:35:32 UTC
SUMMARY
Please make it clear in ECMAddAppIcon documentation that the resulting sources must be added in the executable target directly.

ecm_add_app_icon doesn't work as expected at least on Windows if you add the sources in an intermediate STATIC or OBJECT library. I made this mistake in KTimeTracker, fixed it like this: http://commits.kde.org/ktimetracker/e712367404548bf200fb86e7ca2850f0c0785a4a

Kate is still broken: https://bugs.kde.org/show_bug.cgi?id=415260

STEPS TO REPRODUCE
1. 
2. 
3. 

OBSERVED RESULT


EXPECTED RESULT


SOFTWARE/OS VERSIONS
Windows: 10
macOS: 
Linux/KDE Plasma: 
(available in About System)
KDE Plasma Version: 
KDE Frameworks Version: 
Qt Version: 

ADDITIONAL INFORMATION
Comment 1 Christophe Marin 2019-12-18 07:56:44 UTC
No need, the doc already says it must be used with the 'executable target':

« # will be added to the executable target whose sources are specified by
# ``<sources_var>`` »
Comment 2 Alexander Potashev 2019-12-22 03:39:38 UTC
(In reply to Christophe Giboudeaux from comment #1)
> No need, the doc already says it must be used with the 'executable target':
> 
> « # will be added to the executable target whose sources are specified by
> # ``<sources_var>`` »

This phrase does not imply that the sources must be added into add_executable() directly.

In a case when you have part of application code (defined in variable MYLIB_SOURCES) compiled into library "mylib", the condition "whose sources are specified by MYLIB_SOURCES" still holds true. However the icon will not be added into the executable target.

Our discussion also proves that this existing sentence is hard to read and understand correctly.


Also, I think saying the same thing twice in different words is not bad.