Removing the explicit ${CMAKE_CURRENT_BINARY_DIR}/ prefix from the
add_custom_command OUTPUT part, fixes ninja warnings for me. I assume this is possible now after we chose a different target name for the add_custom_target().
This version works fine for me with ninja and make now. Does this look sensible and work for others?