From a22db499184b9b43a248ea9943694572cb80c046 Mon Sep 17 00:00:00 2001 From: Pier Luigi Fiorini Date: Wed, 13 Dec 2023 08:40:57 +0100 Subject: [PATCH] Prepend current source directory Make the path absolute, otherwise the scanner would not find the file if a relative path was passed. --- src/waylandscanner/AuroraScannerMacros.cmake | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/waylandscanner/AuroraScannerMacros.cmake b/src/waylandscanner/AuroraScannerMacros.cmake index 105b09a..0203e64 100644 --- a/src/waylandscanner/AuroraScannerMacros.cmake +++ b/src/waylandscanner/AuroraScannerMacros.cmake @@ -25,6 +25,9 @@ function(aurora_generate_wayland_protocol_client_sources target) foreach(protocol_file IN LISTS _arg_FILES) get_filename_component(protocol_name "${protocol_file}" NAME_WLE) + if(NOT IS_ABSOLUTE "${protocol_file}") + set(protocol_file "${CMAKE_CURRENT_SOURCE_DIR}/${protocol_file}") + endif() set(c_code_path "${target_binary_dir}/wayland_generated/wayland-${protocol_name}-protocol.c") set(c_header_path "${target_binary_dir}/wayland_generated/wayland-${protocol_name}-client-protocol.h") @@ -105,6 +108,9 @@ function(aurora_generate_wayland_protocol_server_sources target) foreach(protocol_file IN LISTS _arg_FILES) get_filename_component(protocol_name "${protocol_file}" NAME_WLE) + if(NOT IS_ABSOLUTE "${protocol_file}") + set(protocol_file "${CMAKE_CURRENT_SOURCE_DIR}/${protocol_file}") + endif() set(c_code_path "${target_binary_dir}/wayland_generated/wayland-${protocol_name}-protocol.c") set(c_header_path "${target_binary_dir}/wayland_generated/wayland-${protocol_name}-server-protocol.h")