CMakeLists: wayland.xml is in wayland-scanner pkgdatadir (#55)

See 6c4a695045/meson.build (L129-136)
This commit is contained in:
Florian Klink 2024-08-19 16:02:14 +03:00 committed by GitHub
parent 7f8df01d42
commit 71da3e00a0
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -71,8 +71,8 @@ endif()
# Protocols # Protocols
pkg_get_variable(WAYLAND_PROTOCOLS_DIR wayland-protocols pkgdatadir) pkg_get_variable(WAYLAND_PROTOCOLS_DIR wayland-protocols pkgdatadir)
message(STATUS "Found wayland-protocols at ${WAYLAND_PROTOCOLS_DIR}") message(STATUS "Found wayland-protocols at ${WAYLAND_PROTOCOLS_DIR}")
pkg_get_variable(WAYLAND_CLIENT_DIR wayland-client pkgdatadir) pkg_get_variable(WAYLAND_SCANNER_PKGDATA_DIR wayland-scanner pkgdatadir)
message(STATUS "Found wayland-client at ${WAYLAND_CLIENT_DIR}") message(STATUS "Found wayland-scanner pkgdatadir at ${WAYLAND_SCANNER_PKGDATA_DIR}")
function(protocolNew protoPath protoName external) function(protocolNew protoPath protoName external)
if(external) if(external)
@ -94,7 +94,7 @@ function(protocolWayland)
OUTPUT ${CMAKE_SOURCE_DIR}/protocols/wayland.cpp OUTPUT ${CMAKE_SOURCE_DIR}/protocols/wayland.cpp
${CMAKE_SOURCE_DIR}/protocols/wayland.hpp ${CMAKE_SOURCE_DIR}/protocols/wayland.hpp
COMMAND hyprwayland-scanner --wayland-enums --client COMMAND hyprwayland-scanner --wayland-enums --client
${WAYLAND_CLIENT_DIR}/wayland.xml ${CMAKE_SOURCE_DIR}/protocols/ ${WAYLAND_SCANNER_PKGDATA_DIR}/wayland.xml ${CMAKE_SOURCE_DIR}/protocols/
WORKING_DIRECTORY ${CMAKE_SOURCE_DIR}) WORKING_DIRECTORY ${CMAKE_SOURCE_DIR})
target_sources(aquamarine PRIVATE protocols/wayland.cpp protocols/wayland.hpp) target_sources(aquamarine PRIVATE protocols/wayland.cpp protocols/wayland.hpp)
endfunction() endfunction()