Bug 418905

Summary: Unable to build as static library because of interaction w/ GenerateExportHeader
Product: [Frameworks and Libraries] frameworks-kirigami Reporter: Charles Barto <barto.charlie+kde_bugs>
Component: generalAssignee: Marco Martin <notmart>
Status: RESOLVED FIXED    
Severity: normal CC: nicolas.fella
Priority: NOR    
Version: Master   
Target Milestone: Not decided   
Platform: Other   
OS: All   
Latest Commit: Version Fixed In:
Sentry Crash Report:

Description Charles Barto 2020-03-16 02:12:18 UTC
SUMMARY
It's not possible to build as a static library, because kirigami sets the STATIC_LIBRARY variable to "1" when building as a static library, then it tries to use GenerateExportHeader, which has code like the following:

get_property(type TARGET ${TARGET_LIBRARY} PROPERTY TYPE)
if(NOT ${TYPE} STREQUAL "STATIC_LIBRARY" ...)

this if statement fails, because the "${type}" parameter is expanded to STATIC_LIBRARY, which is then expanded by the if statement to "1"!

STEPS TO REPRODUCE
1. 
2. 
3. 

OBSERVED RESULT


EXPECTED RESULT


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

ADDITIONAL INFORMATION
Comment 1 Nicolas Fella 2020-08-22 14:19:49 UTC
I believe this has been fixed. I can build a static build fine.