all: import module dependencies via qmldir

Improves compatibility with qml tooling.
This commit is contained in:
outfoxxed 2024-05-29 19:29:57 -07:00
parent 0519acf1d6
commit 569c40494d
Signed by: outfoxxed
GPG key ID: 4C88A185FB89301E
7 changed files with 23 additions and 66 deletions

View file

@ -1,15 +1,24 @@
qt_add_library(quickshell-hyprland STATIC)
qt_add_qml_module(quickshell-hyprland URI Quickshell.Hyprland VERSION 0.1)
target_link_libraries(quickshell-hyprland PRIVATE ${QT_DEPS})
set(HYPRLAND_MODULES)
if (HYPRLAND_FOCUS_GRAB)
add_subdirectory(focus_grab)
list(APPEND HYPRLAND_MODULES Quickshell.Hyprland._FocusGrab)
endif()
if (HYPRLAND_GLOBAL_SHORTCUTS)
add_subdirectory(global_shortcuts)
list(APPEND HYPRLAND_MODULES Quickshell.Hyprland._GlobalShortcuts)
endif()
target_link_libraries(quickshell-hyprland PRIVATE ${QT_DEPS})
qt_add_qml_module(quickshell-hyprland
URI Quickshell.Hyprland
VERSION 0.1
IMPORTS ${HYPRLAND_MODULES}
)
qs_pch(quickshell-hyprland)
qs_pch(quickshell-hyprlandplugin)