Skip to content

Commit

Permalink
build(deps): use submodules for wayland protocols (#1731)
Browse files Browse the repository at this point in the history
  • Loading branch information
ReenigneArcher authored Oct 10, 2023
1 parent 395d572 commit f1cd946
Show file tree
Hide file tree
Showing 8 changed files with 18 additions and 430 deletions.
8 changes: 8 additions & 0 deletions .gitmodules
Original file line number Diff line number Diff line change
Expand Up @@ -58,3 +58,11 @@
path = third-party/ffmpeg-linux-powerpc64le
url = https://github.com/LizardByte/build-deps
branch = ffmpeg-linux-powerpc64le
[submodule "third-party/wayland-protocols"]
path = third-party/wayland-protocols
url = https://gitlab.freedesktop.org/wayland/wayland-protocols
branch = main
[submodule "third-party/wlr-protocols"]
path = third-party/wlr-protocols
url = https://gitlab.freedesktop.org/wlroots/wlr-protocols
branch = master
1 change: 1 addition & 0 deletions .readthedocs.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ build:
- libboost-locale-dev # required for rstcheck in cpp code block
jobs:
post_build:
- find ./third-party -iname "*.rst" -type f -delete # find and delete rst files in third-party
- rstcheck -r . # lint rst files
# - rstfmt --check --diff -w 120 . # check rst formatting

Expand Down
4 changes: 2 additions & 2 deletions cmake/compile_definitions/linux.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -127,8 +127,8 @@ endif()
if(WAYLAND_FOUND)
add_compile_definitions(SUNSHINE_BUILD_WAYLAND)

GEN_WAYLAND(xdg-output-unstable-v1)
GEN_WAYLAND(wlr-export-dmabuf-unstable-v1)
GEN_WAYLAND("wayland-protocols" "unstable/xdg-output" xdg-output-unstable-v1)
GEN_WAYLAND("wlr-protocols" "unstable" wlr-export-dmabuf-unstable-v1)

include_directories(
SYSTEM
Expand Down
10 changes: 5 additions & 5 deletions cmake/macros/linux.cmake
Original file line number Diff line number Diff line change
@@ -1,21 +1,21 @@
# linux specific macros

# GEN_WAYLAND: args = `filename`
macro(GEN_WAYLAND filename)
macro(GEN_WAYLAND wayland_directory subdirectory filename)
file(MAKE_DIRECTORY ${CMAKE_BINARY_DIR}/generated-src)

message("wayland-scanner private-code \
${CMAKE_SOURCE_DIR}/third-party/wayland-protocols/${filename}.xml \
${CMAKE_SOURCE_DIR}/third-party/${wayland_directory}/${subdirectory}/${filename}.xml \
${CMAKE_BINARY_DIR}/generated-src/${filename}.c")
message("wayland-scanner client-header \
${CMAKE_SOURCE_DIR}/third-party/wayland-protocols/${filename}.xml \
${CMAKE_SOURCE_DIR}/third-party/${wayland_directory}/${subdirectory}/${filename}.xml \
${CMAKE_BINARY_DIR}/generated-src/${filename}.h")
execute_process(
COMMAND wayland-scanner private-code
${CMAKE_SOURCE_DIR}/third-party/wayland-protocols/${filename}.xml
${CMAKE_SOURCE_DIR}/third-party/${wayland_directory}/${subdirectory}/${filename}.xml
${CMAKE_BINARY_DIR}/generated-src/${filename}.c
COMMAND wayland-scanner client-header
${CMAKE_SOURCE_DIR}/third-party/wayland-protocols/${filename}.xml
${CMAKE_SOURCE_DIR}/third-party/${wayland_directory}/${subdirectory}/${filename}.xml
${CMAKE_BINARY_DIR}/generated-src/${filename}.h

RESULT_VARIABLE EXIT_INT
Expand Down
1 change: 1 addition & 0 deletions third-party/wayland-protocols
Submodule wayland-protocols added at 681c33
203 changes: 0 additions & 203 deletions third-party/wayland-protocols/wlr-export-dmabuf-unstable-v1.xml

This file was deleted.

Loading

0 comments on commit f1cd946

Please sign in to comment.