Make FindExiv2.cmake work with exiv 0.27.
ClosedPublic

Authored by krop on Nov 20 2018, 10:02 AM.

Details

Summary

In exiv2 >= 0.27, the version is not defined in version.hpp but in exv_conf.h.
The module now:

  • tries to use the version in the pkgconfig file,
  • If it's not (or cannot be) found, it parses both files to find it.

The module was also refreshed to use the modern CMake syntax and follow our
CMake policies.

Test Plan

exiv2 0.26 and 0.27 are found.

Diff Detail

Repository
R260 Gwenview
Lint
Automatic diff as part of commit; lint not applicable.
Unit
Automatic diff as part of commit; unit tests not applicable.
krop created this revision.Nov 20 2018, 10:02 AM
Restricted Application added a project: Gwenview. · View Herald TranscriptNov 20 2018, 10:02 AM
krop requested review of this revision.Nov 20 2018, 10:02 AM
rempt added a subscriber: rempt.Nov 20 2018, 10:10 AM

Hm... I guess this would be good to have in Krita, too, which also has a findExiv2.cmake

krop added a comment.Nov 20 2018, 10:14 AM

Hm... I guess this would be good to have in Krita, too, which also has a findExiv2.cmake

yep, if accepted, I'll copy the modules in kfilemetadata, koko, libkexiv2, krename, kphotoalbum and krita. No idea why we have so many copies around.

This revision was not accepted when it landed; it landed in state Needs Review.Nov 30 2018, 10:32 AM
This revision was automatically updated to reflect the committed changes.