Fix linking with KCUPSLIB_EXPORT instead of Q_DECL_EXPORT
The issue with Q_DECL_EXPORT
is that it doesn't automatically
switch to an import declaration when being used by external code.
This might not matter on every system but it fails on mine.
CMakeLists.txt gets a new generate_export_header(kcupslib)
command
so that KCUPSLIB_EXPORT
can be used in the first place.
Question to reviewers: Do we have to wait for print-manager to require qt6-kf6 before merging this change? iirc the export macro behind generate_export_header()
uses a slightly different way to declare visibility than Q_DECL_EXPORT
, and I'd hate to be responsible for breaking ABI this late in the life of KF5. (Or ever, really.)