Allow building kwalletd against gpgme++ from gpgme 1.7
Review Request #129339 - Created Nov. 5, 2016 and submitted
This patch, based on the one from the kwallet repo, allows building kwalletd against the gpgme++ library provided by gpgme 1.7 instead of the kdepimlibs one.
1) with kdepimlibs
2) with no kdepimlibs and gpgme 1.7
3) with no kdepimlibs and no gpgme
Builds correctly in all cases, links to the expected version of libgpgme++ in the first two cases. In the first case there is no change in behaviour with respect to the previous situation.
Please do this in reverse logic, same as in the kwallet.git commit you are referring to - that means searching for Gpgmepp first (which is unique to GpgME++) and only if NOT Gpgmepp_FOUND do you search for Gpgme and QGpgme (the latter is both known to kdepimlibs-4 and GpgME++) to make sure there is no bogus linking and to avoid confusion in FEATURE_SUMMARY output.
Looks good to me, as far as i understand it prefers "the old way" and if it can not find the old way it uses the new headers, makes sense. I am not an expert on the code but if it's based on something that was commited in kwallet.git already I don't see why you could not commit unless there's real objections by someone.