2024-04-28 14:48:42 +02:00
|
|
|
@PACKAGE_INIT@
|
|
|
|
|
|
|
|
set_and_check(BINDIR "@PACKAGE_CMAKE_INSTALL_BINDIR@")
|
|
|
|
|
|
|
|
function(hyprwayland_protocol targets protoName protoPath outputPath)
|
|
|
|
add_custom_command(
|
|
|
|
OUTPUT "${outputPath}/${protoName}.cpp"
|
|
|
|
COMMAND "${BINDIR}/hyprwayland-scanner" "${protoPath}/${protoName}.xml" "${outputPath}"
|
|
|
|
)
|
|
|
|
foreach(target ${targets})
|
|
|
|
target_sources(${target} PRIVATE "${outputPath}/${protoName}.cpp")
|
2024-05-13 15:56:29 +02:00
|
|
|
target_sources(${target} PRIVATE "${outputPath}/${protoName}.hpp")
|
2024-04-28 14:48:42 +02:00
|
|
|
endforeach()
|
|
|
|
endfunction()
|
|
|
|
|
|
|
|
check_required_components(hyprwayland-scanner)
|