Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Improve cmake find_package scanning for KDE/Qt #635

Open
phmccarty opened this issue May 5, 2020 · 0 comments
Open

Improve cmake find_package scanning for KDE/Qt #635

phmccarty opened this issue May 5, 2020 · 0 comments
Labels
enhancement Feature request for autospec

Comments

@phmccarty
Copy link
Contributor

After extending the list of cmake module mappings recently (#628), find_package scanning has improved significantly.

The scanning can be further improved by scanning for COMPONENTS passed to find_package specifically for the Qt5 and KF5 packages. For those packages, each component indicates a module name, and that name is produced by appending the component name to the package name. For example, find_package(Qt5 ... COMPONENTS Core) should return the modules Qt5 and Qt5Core instead of just Qt5.

More extended examples can be found in this CMakeLists.txt; in particular, scanning these two commands:

find_package(Qt5 ${QT_MIN_VERSION} CONFIG REQUIRED COMPONENTS
    Core
    Concurrent
    DBus
    PrintSupport
    QuickWidgets
    Widgets
)

find_package(KF5 ${KF5_MIN_VERSION} REQUIRED
    CoreAddons
    Config
    I18n
    Declarative
    KIO
    Kirigami2
    Notifications
    Plasma
    Wayland
    WidgetsAddons
    WindowSystem
)

should produce these modules:

Qt5
Qt5Core
Qt5Concurrent
Qt5DBus
Qt5PrintSupport
Qt5QuickWidgets
Qt5Widgets
KF5
KF5CoreAddons
KF5Config
KF5I18n
KF5Declarative
KF5KIO
KF5Kirigami2
KF5Notifications
KF5Plasma
KF5Wayland
KF5WidgetsAddons
KF5WindowSystem
@phmccarty phmccarty added the enhancement Feature request for autospec label May 5, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement Feature request for autospec
Projects
None yet
Development

No branches or pull requests

1 participant