lirios / cmake-shared

:book: Shared CMake functions and macros
Other
8 stars 7 forks source link

INSTALL_PLUGINSDIR should be the result of QT_INSTALL_PLUGINS (from qmake -query) instead of "${INSTALL_LIBDIR}/plugins" #23

Open n3rdopolis opened 2 years ago

n3rdopolis commented 2 years ago

This will make it more compatible with distros that build their qtbase with a custom archdatadir, I think this must be what KDE does

I can work around it with -DINSTALL_PLUGINSDIR to not have to pass a QT_PLUGIN_PATH

but it makes it compatible with say archdatadir /opt/lib/$DEB_HOST_MULTIARCH/qt5/ in a multiarch layout, and coinstallability with Qt6

plfiorini commented 2 years ago

The way it is now with "${INSTALL_LIBDIR}/plugins", plugins are installed under the installation prefix which might not be /usr (in fact it's /usr/local by default). Some time ago I was using QT_PLUGIN_PATH but people had /usr/local installations with plugins under QT_PLUGIN_PATH and it was a mess.

Why can't you just pass -DINSTALL_PLUGINSDIR=/opt/lib/$DEB_HOST_MULTIARCH/qt5/ ?

n3rdopolis commented 2 years ago

-DINSTALL_PLUGINSDIR=/opt/lib/$DEB_HOST_MULTIARCH/qt5/ is what I do for now, so I am OK with that

OK, yeah, I can see how that detection path could cause files to be installed out of /usr/local for folks that don't build their own Qt