Fix build with cmake < 3.7

Authored by wbauer on Aug 7 2019, 9:29 AM.



VERSION_GREATER_EQUAL was introduced in cmake 3.7, but the specified minimum version is 3.0.
So use NOT VERSION_LESS instead to still support older cmake versions too.

Test Plan

Builds fine with cmake 3.5.2 now, and also newer versions.
The file is still installed to ${KDE_INSTALL_LOGGINGCATEGORIESDIR} when building with latest KF5 from git, haven't tried older versions.

Before, I got this error when using cmake 3.5.2:

CMake Error at CMakeLists.txt:108 (if):
 if given arguments:


  Unknown arguments specified

Diff Detail

R36 Ark
Automatic diff as part of commit; lint not applicable.
Automatic diff as part of commit; unit tests not applicable.
wbauer created this revision.Aug 7 2019, 9:29 AM
Restricted Application added subscribers: Ark, kde-utils-devel. · View Herald TranscriptAug 7 2019, 9:29 AM
wbauer requested review of this revision.Aug 7 2019, 9:29 AM
wbauer added a reviewer: Ark.
dakon added a subscriber: dakon.Aug 7 2019, 9:36 AM
dakon added inline comments.

This can be simplified to "NOT ECM_VERSION VERSION_LESS", so you only have to touch one line.

wbauer added inline comments.Aug 7 2019, 9:46 AM

Ok, but I thought the end result is better readable this way.

wbauer updated this revision to Diff 63261.Aug 7 2019, 9:51 AM
wbauer edited the summary of this revision. (Show Details)

Use NOT VERSION_LESS instead to minimize patch.

wbauer marked an inline comment as done.Aug 7 2019, 9:51 AM
elvisangelaccio accepted this revision.Aug 7 2019, 8:22 PM
This revision is now accepted and ready to land.Aug 7 2019, 8:22 PM
This revision was automatically updated to reflect the committed changes.