Remove the STATIC_LIBRARY option to fix static builds
Needs ReviewPublic

Authored by bartoc on Mon, Mar 16, 3:07 AM.

Details

Reviewers
None
Group Reviewers
Kirigami
Summary

Previously static builds were broken because
GenerateExportHeader used:
get_property(type TARGET ${TARGET_LIBRARY} PROPERTY TYPE)
which returns STATIC_LIBRARY, however since we had an
option of the same name that variable was "dobule expanded"
in if statements, breaking GenerateExportHeader's logic

Additionally remove the legacy style elseif(...) and endif(...) form
conditionals

fixes https://bugs.kde.org/show_bug.cgi?id=418905

Diff Detail

Lint
Lint Skipped
Unit
Unit Tests Skipped
bartoc created this revision.Mon, Mar 16, 3:07 AM
Restricted Application added a subscriber: plasma-devel. · View Herald TranscriptMon, Mar 16, 3:07 AM
bartoc requested review of this revision.Mon, Mar 16, 3:07 AM
apol added a subscriber: apol.Mon, Mar 16, 11:32 AM

Makes sense to me. +1

Since most people who did static builds will be using STATIC_LIBRARY, can you set a fatal error if it's on, so the devs know to use BUILD_SHARED_LIBS instead?

In D28066#628195, @apol wrote:

Makes sense to me. +1

Since most people who did static builds will be using STATIC_LIBRARY, can you set a fatal error if it's on, so the devs know to use BUILD_SHARED_LIBS instead?

Allright. I'm also looking into making a plugin target get installed so you can link against kirigamiplugin.lib in cmake.

bartoc updated this revision to Diff 78262.Mon, Mar 23, 3:19 AM

Made setting STATIC_LIBRARY a fatal error.