From 2f76f70c766390019241954a6645219422113daf Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Camilla=20L=C3=B6wy?= Date: Mon, 12 Oct 2020 18:34:09 +0200 Subject: [PATCH] Wayland: Simplify adding of protocol sources --- src/CMakeLists.txt | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index 7c095e67..14450938 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -54,17 +54,15 @@ if (_GLFW_WAYLAND) COMMAND "${WAYLAND_SCANNER_EXECUTABLE}" client-header "${protocol_file}" "${output_file}.h" DEPENDS "${protocol_file}" VERBATIM) - list(APPEND GLFW_WAYLAND_PROTOCOL_SOURCES "${output_file}.h)" add_custom_command(OUTPUT "${output_file}.c" COMMAND "${WAYLAND_SCANNER_EXECUTABLE}" private-code "${protocol_file}" "${output_file}.c" DEPENDS "${protocol_file}" VERBATIM) - list(APPEND GLFW_WAYLAND_PROTOCOL_SOURCES "${output_file}.c") + target_sources(glfw PRIVATE "${output_file}.h" "${output_file}.c") endmacro() - set(GLFW_WAYLAND_PROTOCOL_SOURCES) wayland_generate( "${WAYLAND_PROTOCOLS_BASE}/stable/xdg-shell/xdg-shell.xml" "${GLFW_BINARY_DIR}/src/wayland-xdg-shell-client-protocol") @@ -83,8 +81,6 @@ if (_GLFW_WAYLAND) wayland_generate( "${WAYLAND_PROTOCOLS_BASE}/unstable/idle-inhibit/idle-inhibit-unstable-v1.xml" "${GLFW_BINARY_DIR}/src/wayland-idle-inhibit-unstable-v1-client-protocol") - - target_sources(glfw PRIVATE ${GLFW_WAYLAND_PROTOCOL_SOURCES}) endif() if (WIN32 AND BUILD_SHARED_LIBS)