forked from quickshell/quickshell
all: optimize build
This commit is contained in:
parent
1168879d6d
commit
7ffce72b31
51 changed files with 1526 additions and 1277 deletions
|
@ -20,6 +20,14 @@ execute_process(
|
|||
|
||||
message(STATUS "Found wayland-protocols at ${WAYLAND_PROTOCOLS_DIR}")
|
||||
|
||||
qs_add_pchset(wayland-protocol
|
||||
DEPENDENCIES Qt::Core Qt::WaylandClient Qt::WaylandClientPrivate
|
||||
HEADERS
|
||||
<wayland-client.h>
|
||||
<qbytearray.h>
|
||||
<qstring.h>
|
||||
)
|
||||
|
||||
function (wl_proto target name path)
|
||||
set(PROTO_BUILD_PATH ${CMAKE_CURRENT_BINARY_DIR}/wl-proto/${name})
|
||||
make_directory(${PROTO_BUILD_PATH})
|
||||
|
@ -53,13 +61,12 @@ function (wl_proto target name path)
|
|||
DEPENDS Qt6::qtwaylandscanner "${path}"
|
||||
)
|
||||
|
||||
add_library(wl-proto-${name}
|
||||
${WS_CLIENT_HEADER} ${WS_CLIENT_CODE}
|
||||
${QWS_CLIENT_HEADER} ${QWS_CLIENT_CODE}
|
||||
)
|
||||
add_library(wl-proto-${name}-wl STATIC ${WS_CLIENT_HEADER} ${WS_CLIENT_CODE})
|
||||
add_library(wl-proto-${name} STATIC ${QWS_CLIENT_HEADER} ${QWS_CLIENT_CODE})
|
||||
|
||||
target_include_directories(wl-proto-${name} INTERFACE ${PROTO_BUILD_PATH})
|
||||
target_link_libraries(wl-proto-${name} Qt6::WaylandClient Qt6::WaylandClientPrivate)
|
||||
target_link_libraries(wl-proto-${name} wl-proto-${name}-wl Qt6::WaylandClient Qt6::WaylandClientPrivate)
|
||||
qs_pch(wl-proto-${name} SET wayland-protocol)
|
||||
|
||||
target_link_libraries(${target} PRIVATE wl-proto-${name})
|
||||
endfunction()
|
||||
|
@ -100,20 +107,24 @@ if (HYPRLAND)
|
|||
add_subdirectory(hyprland)
|
||||
endif()
|
||||
|
||||
target_link_libraries(quickshell-wayland PRIVATE ${QT_DEPS})
|
||||
target_link_libraries(quickshell-wayland-init PRIVATE ${QT_DEPS})
|
||||
# widgets for qmenu
|
||||
target_link_libraries(quickshell-wayland PRIVATE
|
||||
Qt::Quick Qt::Widgets Qt::WaylandClient Qt::WaylandClientPrivate
|
||||
)
|
||||
|
||||
target_link_libraries(quickshell-wayland-init PRIVATE Qt::Quick)
|
||||
|
||||
qt_add_qml_module(quickshell-wayland
|
||||
URI Quickshell.Wayland
|
||||
VERSION 0.1
|
||||
DEPENDENCIES QtQuick Quickshell
|
||||
DEPENDENCIES QtQuick
|
||||
IMPORTS ${WAYLAND_MODULES}
|
||||
)
|
||||
|
||||
qs_add_module_deps_light(quickshell-wayland Quickshell)
|
||||
|
||||
install_qml_module(quickshell-wayland)
|
||||
|
||||
qs_pch(quickshell-wayland)
|
||||
qs_pch(quickshell-waylandplugin)
|
||||
qs_pch(quickshell-wayland-init)
|
||||
qs_module_pch(quickshell-wayland SET large)
|
||||
|
||||
target_link_libraries(quickshell PRIVATE quickshell-waylandplugin quickshell-wayland-init)
|
||||
|
|
|
@ -27,7 +27,6 @@ qt_add_qml_module(quickshell-hyprland
|
|||
|
||||
install_qml_module(quickshell-hyprland)
|
||||
|
||||
qs_pch(quickshell-hyprland)
|
||||
qs_pch(quickshell-hyprlandplugin)
|
||||
# intentionally no pch as the module is empty
|
||||
|
||||
target_link_libraries(quickshell PRIVATE quickshell-hyprlandplugin)
|
||||
|
|
|
@ -7,9 +7,11 @@ 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
|
||||
DEPENDENCIES QtQml
|
||||
)
|
||||
|
||||
qs_add_module_deps_light(quickshell-hyprland-focus-grab Quickshell)
|
||||
|
||||
install_qml_module(quickshell-hyprland-focus-grab)
|
||||
|
||||
wl_proto(quickshell-hyprland-focus-grab
|
||||
|
@ -17,9 +19,10 @@ wl_proto(quickshell-hyprland-focus-grab
|
|||
"${CMAKE_CURRENT_SOURCE_DIR}/hyprland-focus-grab-v1.xml"
|
||||
)
|
||||
|
||||
target_link_libraries(quickshell-hyprland-focus-grab PRIVATE ${QT_DEPS} wayland-client)
|
||||
target_link_libraries(quickshell-hyprland-focus-grab PRIVATE
|
||||
Qt::Quick Qt::WaylandClient Qt::WaylandClientPrivate wayland-client
|
||||
)
|
||||
|
||||
qs_pch(quickshell-hyprland-focus-grab)
|
||||
qs_pch(quickshell-hyprland-focus-grabplugin)
|
||||
qs_module_pch(quickshell-hyprland-focus-grab SET large)
|
||||
|
||||
target_link_libraries(quickshell PRIVATE quickshell-hyprland-focus-grabplugin)
|
||||
|
|
|
@ -17,9 +17,10 @@ wl_proto(quickshell-hyprland-global-shortcuts
|
|||
"${CMAKE_CURRENT_SOURCE_DIR}/hyprland-global-shortcuts-v1.xml"
|
||||
)
|
||||
|
||||
target_link_libraries(quickshell-hyprland-global-shortcuts PRIVATE ${QT_DEPS} wayland-client)
|
||||
target_link_libraries(quickshell-hyprland-global-shortcuts PRIVATE
|
||||
Qt::Qml Qt::WaylandClient Qt::WaylandClientPrivate wayland-client
|
||||
)
|
||||
|
||||
qs_pch(quickshell-hyprland-global-shortcuts)
|
||||
qs_pch(quickshell-hyprland-global-shortcutsplugin)
|
||||
qs_module_pch(quickshell-hyprland-global-shortcuts)
|
||||
|
||||
target_link_libraries(quickshell PRIVATE quickshell-hyprland-global-shortcutsplugin)
|
||||
|
|
|
@ -8,14 +8,15 @@ qt_add_library(quickshell-hyprland-ipc STATIC
|
|||
qt_add_qml_module(quickshell-hyprland-ipc
|
||||
URI Quickshell.Hyprland._Ipc
|
||||
VERSION 0.1
|
||||
DEPENDENCIES QtQml Quickshell
|
||||
DEPENDENCIES QtQuick
|
||||
)
|
||||
|
||||
qs_add_module_deps_light(quickshell-hyprland-ipc Quickshell)
|
||||
|
||||
install_qml_module(quickshell-hyprland-ipc)
|
||||
|
||||
target_link_libraries(quickshell-hyprland-ipc PRIVATE ${QT_DEPS})
|
||||
target_link_libraries(quickshell-hyprland-ipc PRIVATE Qt::Quick)
|
||||
|
||||
qs_pch(quickshell-hyprland-ipc)
|
||||
qs_pch(quickshell-hyprland-ipcplugin)
|
||||
qs_module_pch(quickshell-hyprland-ipc SET large)
|
||||
|
||||
target_link_libraries(quickshell PRIVATE quickshell-hyprland-ipcplugin)
|
||||
|
|
|
@ -8,6 +8,7 @@
|
|||
#include <qwindow.h>
|
||||
|
||||
#include "../core/platformmenu.hpp"
|
||||
#include "../core/platformmenu_p.hpp"
|
||||
|
||||
using namespace qs::menu::platform;
|
||||
|
||||
|
|
|
@ -8,6 +8,7 @@ qt_add_library(quickshell-wayland-sessionlock STATIC
|
|||
|
||||
wl_proto(quickshell-wayland-sessionlock ext-session-lock-v1 "${WAYLAND_PROTOCOLS}/staging/ext-session-lock/ext-session-lock-v1.xml")
|
||||
target_link_libraries(quickshell-wayland-sessionlock PRIVATE ${QT_DEPS} wayland-client)
|
||||
qs_pch(quickshell-wayland-sessionlock)
|
||||
|
||||
qs_pch(quickshell-wayland-sessionlock SET large)
|
||||
|
||||
target_link_libraries(quickshell-wayland PRIVATE quickshell-wayland-sessionlock)
|
||||
|
|
|
@ -7,7 +7,11 @@ 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
|
||||
DEPENDENCIES QtQml
|
||||
)
|
||||
|
||||
qs_add_module_deps_light(quickshell-wayland-toplevel-management
|
||||
Quickshell Quickshell.Wayland
|
||||
)
|
||||
|
||||
install_qml_module(quickshell-wayland-toplevel-management)
|
||||
|
@ -17,9 +21,10 @@ wl_proto(quickshell-wayland-toplevel-management
|
|||
"${CMAKE_CURRENT_SOURCE_DIR}/wlr-foreign-toplevel-management-unstable-v1.xml"
|
||||
)
|
||||
|
||||
target_link_libraries(quickshell-wayland-toplevel-management PRIVATE ${QT_DEPS} wayland-client)
|
||||
target_link_libraries(quickshell-wayland-toplevel-management PRIVATE
|
||||
Qt::Quick Qt::WaylandClient Qt::WaylandClientPrivate wayland-client
|
||||
)
|
||||
|
||||
qs_pch(quickshell-wayland-toplevel-management)
|
||||
qs_pch(quickshell-wayland-toplevel-managementplugin)
|
||||
qs_module_pch(quickshell-wayland-toplevel-management SET large)
|
||||
|
||||
target_link_libraries(quickshell PRIVATE quickshell-wayland-toplevel-managementplugin)
|
||||
|
|
|
@ -7,17 +7,19 @@ qt_add_library(quickshell-wayland-layershell STATIC
|
|||
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
|
||||
DEPENDENCIES QtQuick
|
||||
)
|
||||
|
||||
qs_add_module_deps_light(quickshell-wayland-layershell Quickshell Quickshell.Wayland)
|
||||
|
||||
install_qml_module(quickshell-wayland-layershell)
|
||||
|
||||
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)
|
||||
|
||||
qs_pch(quickshell-wayland-layershell)
|
||||
qs_pch(quickshell-wayland-layershellplugin)
|
||||
target_link_libraries(quickshell-wayland-layershell PRIVATE
|
||||
Qt::Quick Qt::WaylandClient Qt::WaylandClientPrivate wayland-client
|
||||
)
|
||||
|
||||
qs_module_pch(quickshell-wayland-layershell SET large)
|
||||
|
||||
target_link_libraries(quickshell-wayland PRIVATE quickshell-wayland-layershellplugin)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue