Skip to content

Commit

Permalink
Prepend current source directory
Browse files Browse the repository at this point in the history
Make the path absolute, otherwise the scanner would not find the file
if a relative path was passed.
  • Loading branch information
plfiorini committed Dec 13, 2023
1 parent 0630eaa commit a22db49
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions src/waylandscanner/AuroraScannerMacros.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -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")
Expand Down Expand Up @@ -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")
Expand Down

0 comments on commit a22db49

Please sign in to comment.