hyprwayland-scanner/hyprwayland-scanner-config.cmake.in
Yaroslav 65c2636484
cmake: add hpp header as target dependency (#4)
target should depend on protoName.hpp otherwise it'll be a build error
in case of deletion of this file
2024-05-13 14:56:29 +01:00

16 lines
576 B
CMake

@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")
target_sources(${target} PRIVATE "${outputPath}/${protoName}.hpp")
endforeach()
endfunction()
check_required_components(hyprwayland-scanner)