forked from quickshell/quickshell
build: add build options for all components
This commit is contained in:
parent
d06b67107b
commit
bb5bc0547a
4 changed files with 34 additions and 9 deletions
|
@ -18,3 +18,5 @@ qt_add_executable(quickshell
|
|||
)
|
||||
|
||||
qt_add_qml_module(quickshell URI Quickshell)
|
||||
|
||||
target_link_libraries(quickshell PRIVATE ${QT_DEPS})
|
||||
|
|
|
@ -44,19 +44,25 @@ endfunction()
|
|||
|
||||
# -----
|
||||
|
||||
qt_add_library(quickshell-wayland STATIC
|
||||
wlr_layershell.cpp
|
||||
session_lock.cpp
|
||||
)
|
||||
|
||||
qt_add_library(quickshell-wayland STATIC)
|
||||
qt_add_qml_module(quickshell-wayland URI Quickshell.Wayland)
|
||||
|
||||
# required to make sure the constructor is linked
|
||||
add_library(quickshell-wayland-init OBJECT init.cpp)
|
||||
|
||||
add_subdirectory(wlr_layershell)
|
||||
add_subdirectory(session_lock)
|
||||
if (WAYLAND_WLR_LAYERSHELL)
|
||||
target_sources(quickshell-wayland PRIVATE wlr_layershell.cpp)
|
||||
add_subdirectory(wlr_layershell)
|
||||
target_compile_definitions(quickshell-wayland PRIVATE QS_WAYLAND_WLR_LAYERSHELL)
|
||||
target_compile_definitions(quickshell-wayland-init PRIVATE QS_WAYLAND_WLR_LAYERSHELL)
|
||||
endif()
|
||||
|
||||
if (WAYLAND_SESSION_LOCK)
|
||||
target_sources(quickshell-wayland PRIVATE session_lock.cpp)
|
||||
add_subdirectory(session_lock)
|
||||
endif()
|
||||
|
||||
target_link_libraries(quickshell-wayland PRIVATE ${QT_DEPS})
|
||||
target_link_libraries(quickshell-wayland-init PRIVATE ${QT_DEPS})
|
||||
|
||||
target_link_libraries(quickshell PRIVATE ${QT_DEPS} quickshell-waylandplugin quickshell-wayland-init)
|
||||
target_link_libraries(quickshell PRIVATE quickshell-waylandplugin quickshell-wayland-init)
|
||||
|
|
|
@ -2,7 +2,10 @@
|
|||
#include <qqml.h>
|
||||
|
||||
#include "../core/plugin.hpp"
|
||||
|
||||
#ifdef QS_WAYLAND_WLR_LAYERSHELL
|
||||
#include "wlr_layershell.hpp"
|
||||
#endif
|
||||
|
||||
namespace {
|
||||
|
||||
|
@ -10,6 +13,7 @@ class WaylandPlugin: public QuickshellPlugin {
|
|||
bool applies() override { return QGuiApplication::platformName() == "wayland"; }
|
||||
|
||||
void registerTypes() override {
|
||||
#ifdef QS_WAYLAND_WLR_LAYERSHELL
|
||||
qmlRegisterType<WaylandPanelInterface>("Quickshell._WaylandOverlay", 1, 0, "PanelWindow");
|
||||
|
||||
// If any types are defined inside a module using QML_ELEMENT then all QML_ELEMENT types
|
||||
|
@ -29,6 +33,7 @@ class WaylandPlugin: public QuickshellPlugin {
|
|||
"Quickshell._WaylandOverlay",
|
||||
QQmlModuleImportLatest
|
||||
);
|
||||
#endif
|
||||
}
|
||||
};
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue