mirror of
https://codeberg.org/dnkl/yambar.git
synced 2025-04-20 19:35:44 +02:00
cmake: use find_program() to locate wayland-scanner binary
This commit is contained in:
parent
236511db88
commit
4d9ee6ff82
1 changed files with 7 additions and 2 deletions
|
@ -8,6 +8,11 @@ endif ()
|
||||||
|
|
||||||
# Wayland/wlroots bar backend
|
# Wayland/wlroots bar backend
|
||||||
if (ENABLE_WAYLAND)
|
if (ENABLE_WAYLAND)
|
||||||
|
find_program(WAYLAND_SCANNER_EXECUTABLE wayland-scanner)
|
||||||
|
if (WAYLAND_SCANNER_EXECUTABLE-NOTFOUND)
|
||||||
|
message(FATAL_ERROR "could not find wayland-scanner")
|
||||||
|
endif ()
|
||||||
|
|
||||||
function (wayland_protocol _deps)
|
function (wayland_protocol _deps)
|
||||||
set(deps "")
|
set(deps "")
|
||||||
foreach (xml_file ${ARGN})
|
foreach (xml_file ${ARGN})
|
||||||
|
@ -17,13 +22,13 @@ if (ENABLE_WAYLAND)
|
||||||
|
|
||||||
add_custom_command(
|
add_custom_command(
|
||||||
OUTPUT ${out_h}
|
OUTPUT ${out_h}
|
||||||
COMMAND wayland-scanner client-header < ${xml_file} > ${out_h}
|
COMMAND ${WAYLAND_SCANNER_EXECUTABLE} client-header < ${xml_file} > ${out_h}
|
||||||
VERBATIM
|
VERBATIM
|
||||||
MAIN_DEPENDENCY ${xml_file}
|
MAIN_DEPENDENCY ${xml_file}
|
||||||
)
|
)
|
||||||
add_custom_command(
|
add_custom_command(
|
||||||
OUTPUT ${out_c}
|
OUTPUT ${out_c}
|
||||||
COMMAND wayland-scanner private-code < ${xml_file} > ${out_c}
|
COMMAND ${WAYLAND_SCANNER_EXECUTABLE} private-code < ${xml_file} > ${out_c}
|
||||||
VERBATIM
|
VERBATIM
|
||||||
MAIN_DEPENDENCY ${xml_file}
|
MAIN_DEPENDENCY ${xml_file}
|
||||||
)
|
)
|
||||||
|
|
Loading…
Add table
Reference in a new issue