Bug 480107 - kcoreaddons_add_plugin installs in a wrong directory
Summary: kcoreaddons_add_plugin installs in a wrong directory
Status: RESOLVED FIXED
Alias: None
Product: extra-cmake-modules
Classification: Frameworks and Libraries
Component: general (show other bugs)
Version: 5.248.0
Platform: Neon Linux
: NOR normal
Target Milestone: ---
Assignee: ecm-bugs-null@kde.org
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2024-01-20 21:17 UTC by Matin Lotfaliei
Modified: 2024-01-23 19:20 UTC (History)
3 users (show)

See Also:
Latest Commit:
Version Fixed In:
Sentry Crash Report:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Matin Lotfaliei 2024-01-20 21:17:43 UTC
SUMMARY
the kcoreaddons_add_plugin command installs the plugin in the wrong location.

STEPS TO REPRODUCE
1. run cmake install in a project that uses kcoreaddons_add_plugin and see the installed locations

OBSERVED RESULT
Installs the plugin in /usr/lib/x86_64-linux-gnu/plugins

EXPECTED RESULT
Install the plugin in /usr/lib/x86_64-linux-gnu/qt6/plugins

SOFTWARE/OS VERSIONS
Linux/KDE Plasma: Latest Neon Unstable and Fedora Rawhide


ADDITIONAL INFORMATION
It might be related to another bug https://bugs.kde.org/show_bug.cgi?id=461487
Comment 1 Matin Lotfaliei 2024-01-21 03:43:08 UTC
I learned that kcoreaddons uses KDE_INSTALL_PLUGINDIR variable for the installation.
Comment 2 Matin Lotfaliei 2024-01-21 04:26:55 UTC
I learned that I need to set QT_MAJOR_VERSION instead of QT_VERSION_MAJOR before including the KDEInstallDirs to fix it.
Comment 3 Nate Graham 2024-01-23 19:20:31 UTC
Yes, the order does matter here.