Use generated version and CMake config files
Review Request #123314 - Created April 9, 2015 and submitted
|aacid, arichardson, eshalygin|
Replace both the package version file by a generated file, as well as OkularConfig.cmake package configuration file.
Note that with this change the compatibility CMake variable OKULAR_FOUND is not set anymore, use Okular_FOUND instead.
This patch (should) fix the regression on eg. Gentoo systems introduced by RR #123176
Manual testing on a Debian system
@Eugene: does it fix the regression for you?
I cann't say that it fixes the issue. Maybe it does, but I just can not make it working.
I'm testing with Kile. Kile needs access to okular/interfaces/viewerinterface.h. However, this file contains
#include "okularcore_export.h". Thus, path to Okular includes is needed. But OKULAR_INCLUDE_DIR is gone. OK, let's try to do this in the new way. So I add KF5::okularcore target to the dependencies (BTW, why KF5?). But have you seen its INTERFACE_LINK_LIBRARIES property? KF5::Archive;KF5::JS;KF5::JSApi;KF5::KDELibs4Support;KF5::KIOCore;KF5::ThreadWeaver;KF5::Wallet;Phonon::phonon4qt5;m;/usr/lib64/libz.so. Are all of them indeed needed just to link with Okular?
So, what am I doing wrong?
I have now managed to get Kile to compile after applying the following patch: https://paste.kde.org/pcqb8yjuz and once https://git.reviewboard.kde.org/r/123363/ has been applied
I would change this to
This is missing a few dependencies:
find_dependency(Qt5PrintSupport @QT_REQUIRED_VERSION@) find_dependency(Qt5Widgets @QT_REQUIRED_VERSION@) find_dependency(KF5CoreAddons @KF5_REQUIRED_VERSION@) find_dependency(KF5Config @KF5_REQUIRED_VERSION@) find_dependency(KF5XmlGui @KF5_REQUIRED_VERSION@)