add_custom_command(OUTPUT html/index.html
  COMMAND doxygen
  COMMAND rm -rf html
  COMMAND sphinx-build -b html . html
  DEPENDS conf.py index.rst)
add_custom_target(doc DEPENDS html/index.html)

add_custom_command(OUTPUT html/index.html
  COMMAND doxygen
  COMMAND rm -rf html
  COMMAND sphinx-build -b html . html
  DEPENDS conf.py index.rst _templates/layout.html)
add_custom_target(doc DEPENDS html/index.html)

Make docs depend on layout.
Make docs depend on layout.