From a931adf033d93e9e63302f26008983959e2fbf35 Mon Sep 17 00:00:00 2001 From: outfoxxed Date: Thu, 31 Oct 2024 13:45:26 -0700 Subject: [PATCH] all: add DEPENDENCIES entries to qml modules Fixes some qmlls/qmllint issues. --- src/core/CMakeLists.txt | 1 + src/dbus/dbusmenu/CMakeLists.txt | 6 +++++- src/io/CMakeLists.txt | 1 + src/services/greetd/CMakeLists.txt | 1 + src/services/mpris/CMakeLists.txt | 1 + src/services/notifications/CMakeLists.txt | 1 + src/services/pam/CMakeLists.txt | 1 + src/services/pipewire/CMakeLists.txt | 1 + src/services/status_notifier/CMakeLists.txt | 1 + src/services/upower/CMakeLists.txt | 1 + src/wayland/CMakeLists.txt | 1 + src/wayland/hyprland/focus_grab/CMakeLists.txt | 1 + src/wayland/hyprland/global_shortcuts/CMakeLists.txt | 1 + src/wayland/hyprland/ipc/CMakeLists.txt | 1 + src/wayland/toplevel_management/CMakeLists.txt | 1 + src/wayland/wlr_layershell/CMakeLists.txt | 8 +++++++- src/window/CMakeLists.txt | 1 + 17 files changed, 27 insertions(+), 2 deletions(-) diff --git a/src/core/CMakeLists.txt b/src/core/CMakeLists.txt index 8c8d077d..8d50f1f5 100644 --- a/src/core/CMakeLists.txt +++ b/src/core/CMakeLists.txt @@ -44,6 +44,7 @@ target_link_libraries(quickshell-core PRIVATE quickshell-build) qt_add_qml_module(quickshell-core URI Quickshell VERSION 0.1 + DEPENDENCIES QtQuick OPTIONAL_IMPORTS Quickshell._Window DEFAULT_IMPORTS Quickshell._Window ) diff --git a/src/dbus/dbusmenu/CMakeLists.txt b/src/dbus/dbusmenu/CMakeLists.txt index ab222e5a..9e4885a8 100644 --- a/src/dbus/dbusmenu/CMakeLists.txt +++ b/src/dbus/dbusmenu/CMakeLists.txt @@ -14,7 +14,11 @@ qt_add_library(quickshell-dbusmenu STATIC ${DBUS_INTERFACES} ) -qt_add_qml_module(quickshell-dbusmenu URI Quickshell.DBusMenu VERSION 0.1) +qt_add_qml_module(quickshell-dbusmenu + URI Quickshell.DBusMenu + VERSION 0.1 + DEPENDENCIES QtQml Quickshell +) # dbus headers target_include_directories(quickshell-dbusmenu PRIVATE ${CMAKE_CURRENT_BINARY_DIR}) diff --git a/src/io/CMakeLists.txt b/src/io/CMakeLists.txt index 389b8a6f..54cfac00 100644 --- a/src/io/CMakeLists.txt +++ b/src/io/CMakeLists.txt @@ -16,6 +16,7 @@ endif() qt_add_qml_module(quickshell-io URI Quickshell.Io VERSION 0.1 + DEPENDENCIES QtQml QML_FILES FileView.qml ) diff --git a/src/services/greetd/CMakeLists.txt b/src/services/greetd/CMakeLists.txt index 3c8fcf3b..349d28ce 100644 --- a/src/services/greetd/CMakeLists.txt +++ b/src/services/greetd/CMakeLists.txt @@ -6,6 +6,7 @@ qt_add_library(quickshell-service-greetd STATIC qt_add_qml_module(quickshell-service-greetd URI Quickshell.Services.Greetd VERSION 0.1 + DEPENDENCIES QtQml ) target_link_libraries(quickshell-service-greetd PRIVATE ${QT_DEPS}) diff --git a/src/services/mpris/CMakeLists.txt b/src/services/mpris/CMakeLists.txt index 3ee96061..f87edecc 100644 --- a/src/services/mpris/CMakeLists.txt +++ b/src/services/mpris/CMakeLists.txt @@ -30,6 +30,7 @@ target_include_directories(quickshell-service-mpris PRIVATE ${CMAKE_CURRENT_BINA qt_add_qml_module(quickshell-service-mpris URI Quickshell.Services.Mpris VERSION 0.1 + DEPENDENCIES QtQml Quickshell ) target_link_libraries(quickshell-service-mpris PRIVATE ${QT_DEPS} quickshell-dbus) diff --git a/src/services/notifications/CMakeLists.txt b/src/services/notifications/CMakeLists.txt index cc986a84..23f4d692 100644 --- a/src/services/notifications/CMakeLists.txt +++ b/src/services/notifications/CMakeLists.txt @@ -20,6 +20,7 @@ target_include_directories(quickshell-service-notifications PRIVATE ${CMAKE_CURR qt_add_qml_module(quickshell-service-notifications URI Quickshell.Services.Notifications VERSION 0.1 + DEPENDENCIES QtQml Quickshell ) target_link_libraries(quickshell-service-notifications PRIVATE ${QT_DEPS} quickshell-dbus) diff --git a/src/services/pam/CMakeLists.txt b/src/services/pam/CMakeLists.txt index fef23578..a55da739 100644 --- a/src/services/pam/CMakeLists.txt +++ b/src/services/pam/CMakeLists.txt @@ -8,6 +8,7 @@ qt_add_library(quickshell-service-pam STATIC qt_add_qml_module(quickshell-service-pam URI Quickshell.Services.Pam VERSION 0.1 + DEPENDENCIES QtQml ) target_link_libraries(quickshell-service-pam PRIVATE ${QT_DEPS} pam ${PAM_LIBRARIES}) diff --git a/src/services/pipewire/CMakeLists.txt b/src/services/pipewire/CMakeLists.txt index 6996eff7..8c33e644 100644 --- a/src/services/pipewire/CMakeLists.txt +++ b/src/services/pipewire/CMakeLists.txt @@ -16,6 +16,7 @@ qt_add_library(quickshell-service-pipewire STATIC qt_add_qml_module(quickshell-service-pipewire URI Quickshell.Services.Pipewire VERSION 0.1 + DEPENDENCIES QtQml Quickshell ) target_link_libraries(quickshell-service-pipewire PRIVATE ${QT_DEPS} PkgConfig::pipewire) diff --git a/src/services/status_notifier/CMakeLists.txt b/src/services/status_notifier/CMakeLists.txt index 79026836..bc8918d0 100644 --- a/src/services/status_notifier/CMakeLists.txt +++ b/src/services/status_notifier/CMakeLists.txt @@ -41,6 +41,7 @@ target_include_directories(quickshell-service-statusnotifier PRIVATE ${CMAKE_CUR qt_add_qml_module(quickshell-service-statusnotifier URI Quickshell.Services.SystemTray VERSION 0.1 + DEPENDENCIES QtQml Quickshell Quickshell.DBusMenu ) target_link_libraries(quickshell-service-statusnotifier PRIVATE ${QT_DEPS} quickshell-dbus quickshell-dbusmenuplugin) diff --git a/src/services/upower/CMakeLists.txt b/src/services/upower/CMakeLists.txt index 59987c40..e600f8c7 100644 --- a/src/services/upower/CMakeLists.txt +++ b/src/services/upower/CMakeLists.txt @@ -30,6 +30,7 @@ target_include_directories(quickshell-service-upower PRIVATE ${CMAKE_CURRENT_BIN qt_add_qml_module(quickshell-service-upower URI Quickshell.Services.UPower VERSION 0.1 + DEPENDENCIES QtQml Quickshell ) target_link_libraries(quickshell-service-upower PRIVATE ${QT_DEPS} quickshell-dbus) diff --git a/src/wayland/CMakeLists.txt b/src/wayland/CMakeLists.txt index 568edc42..ccb31b07 100644 --- a/src/wayland/CMakeLists.txt +++ b/src/wayland/CMakeLists.txt @@ -106,6 +106,7 @@ target_link_libraries(quickshell-wayland-init PRIVATE ${QT_DEPS}) qt_add_qml_module(quickshell-wayland URI Quickshell.Wayland VERSION 0.1 + DEPENDENCIES QtQuick Quickshell IMPORTS ${WAYLAND_MODULES} ) diff --git a/src/wayland/hyprland/focus_grab/CMakeLists.txt b/src/wayland/hyprland/focus_grab/CMakeLists.txt index 1e37c9fe..a17436ef 100644 --- a/src/wayland/hyprland/focus_grab/CMakeLists.txt +++ b/src/wayland/hyprland/focus_grab/CMakeLists.txt @@ -7,6 +7,7 @@ qt_add_library(quickshell-hyprland-focus-grab STATIC qt_add_qml_module(quickshell-hyprland-focus-grab URI Quickshell.Hyprland._FocusGrab VERSION 0.1 + DEPENDENCIES QtQml Quickshell ) wl_proto(quickshell-hyprland-focus-grab diff --git a/src/wayland/hyprland/global_shortcuts/CMakeLists.txt b/src/wayland/hyprland/global_shortcuts/CMakeLists.txt index 2ccfb74d..cebaa652 100644 --- a/src/wayland/hyprland/global_shortcuts/CMakeLists.txt +++ b/src/wayland/hyprland/global_shortcuts/CMakeLists.txt @@ -7,6 +7,7 @@ qt_add_library(quickshell-hyprland-global-shortcuts STATIC qt_add_qml_module(quickshell-hyprland-global-shortcuts URI Quickshell.Hyprland._GlobalShortcuts VERSION 0.1 + DEPENDENCIES QtQml ) wl_proto(quickshell-hyprland-global-shortcuts diff --git a/src/wayland/hyprland/ipc/CMakeLists.txt b/src/wayland/hyprland/ipc/CMakeLists.txt index 59200462..c2e32888 100644 --- a/src/wayland/hyprland/ipc/CMakeLists.txt +++ b/src/wayland/hyprland/ipc/CMakeLists.txt @@ -8,6 +8,7 @@ qt_add_library(quickshell-hyprland-ipc STATIC qt_add_qml_module(quickshell-hyprland-ipc URI Quickshell.Hyprland._Ipc VERSION 0.1 + DEPENDENCIES QtQml Quickshell ) target_link_libraries(quickshell-hyprland-ipc PRIVATE ${QT_DEPS}) diff --git a/src/wayland/toplevel_management/CMakeLists.txt b/src/wayland/toplevel_management/CMakeLists.txt index 4537c201..6ea0c254 100644 --- a/src/wayland/toplevel_management/CMakeLists.txt +++ b/src/wayland/toplevel_management/CMakeLists.txt @@ -7,6 +7,7 @@ qt_add_library(quickshell-wayland-toplevel-management STATIC qt_add_qml_module(quickshell-wayland-toplevel-management URI Quickshell.Wayland._ToplevelManagement VERSION 0.1 + DEPENDENCIES QtQml Quickshell Quickshell.Wayland ) wl_proto(quickshell-wayland-toplevel-management diff --git a/src/wayland/wlr_layershell/CMakeLists.txt b/src/wayland/wlr_layershell/CMakeLists.txt index 9f82826b..d5439f60 100644 --- a/src/wayland/wlr_layershell/CMakeLists.txt +++ b/src/wayland/wlr_layershell/CMakeLists.txt @@ -4,7 +4,13 @@ qt_add_library(quickshell-wayland-layershell STATIC window.cpp ) -qt_add_qml_module(quickshell-wayland-layershell URI Quickshell.Wayland._WlrLayerShell VERSION 0.1) +qt_add_qml_module(quickshell-wayland-layershell + URI Quickshell.Wayland._WlrLayerShell + VERSION 0.1 + # Quickshell.Wayland currently creates a dependency cycle, add it here once the main + # ls class is moved to this module. + DEPENDENCIES QtQuick Quickshell +) wl_proto(quickshell-wayland-layershell wlr-layer-shell-unstable-v1 "${CMAKE_CURRENT_SOURCE_DIR}/wlr-layer-shell-unstable-v1.xml") target_link_libraries(quickshell-wayland-layershell PRIVATE ${QT_DEPS} wayland-client) diff --git a/src/window/CMakeLists.txt b/src/window/CMakeLists.txt index d415533e..7b140946 100644 --- a/src/window/CMakeLists.txt +++ b/src/window/CMakeLists.txt @@ -9,6 +9,7 @@ qt_add_library(quickshell-window STATIC qt_add_qml_module(quickshell-window URI Quickshell._Window VERSION 0.1 + DEPENDENCIES QtQuick Quickshell ) add_library(quickshell-window-init OBJECT init.cpp)