mirror of
https://github.com/hyprwm/xdg-desktop-portal-hyprland.git
synced 2024-11-23 14:55:57 +01:00
CMake: fix protocolnew external protos
This commit is contained in:
parent
d369682614
commit
9e5c13d775
1 changed files with 12 additions and 8 deletions
|
@ -78,7 +78,7 @@ pkg_check_modules(HYPRLAND_PROTOS IMPORTED_TARGET hyprland-protocols)
|
||||||
if(HYPRLAND_PROTOS_FOUND)
|
if(HYPRLAND_PROTOS_FOUND)
|
||||||
set(HYPRLAND_PROTOCOLS "${HYPRLAND_PROTOS_PREFIX}/share/hyprland-protocols")
|
set(HYPRLAND_PROTOCOLS "${HYPRLAND_PROTOS_PREFIX}/share/hyprland-protocols")
|
||||||
else()
|
else()
|
||||||
set(HYPRLAND_PROTOCOLS "subprojects/hyprland-protocols")
|
set(HYPRLAND_PROTOCOLS "${CMAKE_SOURCE_DIR}/subprojects/hyprland-protocols")
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
file(GLOB_RECURSE SRCFILES CONFIGURE_DEPENDS "src/*.cpp")
|
file(GLOB_RECURSE SRCFILES CONFIGURE_DEPENDS "src/*.cpp")
|
||||||
|
@ -95,7 +95,7 @@ message(STATUS "Found wayland-client at ${WAYLAND_CLIENT_DIR}")
|
||||||
|
|
||||||
function(protocolnew protoPath protoName external)
|
function(protocolnew protoPath protoName external)
|
||||||
if(external)
|
if(external)
|
||||||
set(path ${CMAKE_SOURCE_DIR}/${protoPath})
|
set(path ${protoPath})
|
||||||
else()
|
else()
|
||||||
set(path ${WAYLAND_PROTOCOLS_DIR}/${protoPath})
|
set(path ${WAYLAND_PROTOCOLS_DIR}/${protoPath})
|
||||||
endif()
|
endif()
|
||||||
|
@ -115,15 +115,19 @@ function(protocolWayland)
|
||||||
COMMAND hyprwayland-scanner --wayland-enums --client
|
COMMAND hyprwayland-scanner --wayland-enums --client
|
||||||
${WAYLAND_CLIENT_DIR}/wayland.xml ${CMAKE_SOURCE_DIR}/protocols/
|
${WAYLAND_CLIENT_DIR}/wayland.xml ${CMAKE_SOURCE_DIR}/protocols/
|
||||||
WORKING_DIRECTORY ${CMAKE_SOURCE_DIR})
|
WORKING_DIRECTORY ${CMAKE_SOURCE_DIR})
|
||||||
target_sources(xdg-desktop-portal-hyprland PRIVATE protocols/wayland.cpp protocols/wayland.hpp)
|
target_sources(xdg-desktop-portal-hyprland PRIVATE protocols/wayland.cpp
|
||||||
|
protocols/wayland.hpp)
|
||||||
endfunction()
|
endfunction()
|
||||||
|
|
||||||
protocolwayland()
|
protocolwayland()
|
||||||
|
|
||||||
protocolnew("protocols" "wlr-foreign-toplevel-management-unstable-v1" true)
|
protocolnew("${CMAKE_SOURCE_DIR}/protocols"
|
||||||
protocolnew("protocols" "wlr-screencopy-unstable-v1" true)
|
"wlr-foreign-toplevel-management-unstable-v1" true)
|
||||||
protocolnew("${HYPRLAND_PROTOCOLS}/protocols" "hyprland-global-shortcuts-v1" true)
|
protocolnew("${CMAKE_SOURCE_DIR}/protocols" "wlr-screencopy-unstable-v1" true)
|
||||||
protocolnew("${HYPRLAND_PROTOCOLS}/protocols" "hyprland-toplevel-export-v1" true)
|
protocolnew("${HYPRLAND_PROTOCOLS}/protocols" "hyprland-global-shortcuts-v1"
|
||||||
|
true)
|
||||||
|
protocolnew("${HYPRLAND_PROTOCOLS}/protocols" "hyprland-toplevel-export-v1"
|
||||||
|
true)
|
||||||
protocolnew("unstable/linux-dmabuf" "linux-dmabuf-unstable-v1" false)
|
protocolnew("unstable/linux-dmabuf" "linux-dmabuf-unstable-v1" false)
|
||||||
|
|
||||||
# Installation
|
# Installation
|
||||||
|
|
Loading…
Reference in a new issue