build(deps): use submodules for wayland protocols (#1731)
This commit is contained in:
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user