Description: Allow building against Qt5 with sigon-oauth2plugin having been built against Qt6. Author: Mike Gabriel Abstract: After some investigation of the signond stack, it was discovered that the .pc file of signon-oauth2plugin causes Qt6 libraries being pulled into the build of Qt5 buteo-sync-plugin-caldav unnecessarily. . The file contains no Qt-specific code and does neither include from other Qt'ish headers. So it can be used anywhere. On the other hand, the signon-oauth2plugin.pc file requires signon-plugins.pc which in turn requires libsignon-qt{5,6}.pc. This Would causes unnecessary linking against Qt5+Qt6 if signond is built against Qt6. However, this project is Qt5-only for now, so the Qt6-pull-in needs to be avoided at all means. . The solution is presented below... Forwarded: https://github.com/sailfishos/buteo-sync-plugin-caldav/pull/29 --- a/src/src.pri +++ b/src/src.pri @@ -4,7 +4,16 @@ CONFIG += link_pkgconfig console PKGCONFIG += buteosyncfw5 libsignon-qt5 accounts-qt5 -PKGCONFIG += signon-oauth2plugin KF5CalendarCore libmkcal-qt5 +PKGCONFIG += KF5CalendarCore libmkcal-qt5 + +# We only need one include file from signon-oauth2plugin... No need +# to parse the .pc file. The challenge is to build this package against Qt5 +# whereas signond and signon-plugins + signon-oauth2plugin has already been +# build via Qt6 e.g. in Debian +# +# We have to make sure that the include file gets found!!! But the rest from +# the .pc file can be ignored. +#PKGCONFIG += signon-oauth2plugin packagesExist(libsailfishkeyprovider) { PKGCONFIG += libsailfishkeyprovider --- a/src/authhandler.cpp +++ b/src/authhandler.cpp @@ -35,7 +35,7 @@ #include #include -#include +#include #include #include "logging.h"